Re: [PATCH v2 0/7] trace2: stop allowing die()
From: Derrick Stolee <hidden>
Date: 2026-09-01 13:42:50
On 9/1/2026 1:03 AM, Jeff King wrote:
On Tue, Sep 01, 2026 at 01:01:30AM -0400, Jeff King wrote:quoted
quoted
I don't have much knowledge of CodeQL, but the following vibe-coded .ql script is able to detect these transitive calls and demonstrate the issue:Yeah, I think the whack-a-mole can be solved with static analysis that actually understands the complete (possible) call tree. And then you wouldn't even really need your banned-die.h, because you'd have the real thing.Just to be clear, I am not opposed to banned-die.h in the meantime if it is helpful to your goals. The whack-a-mole is not something I would choose to spend time on, but you are welcome to. ;)
It's helpful in the sense that it demonstrates progress during the refactor, but it's less helpful as a long-term protection. Which you point out quite well. I could easily send a v4 that removes patch 1 and all references to banned-die.h with a focus on "die() less in trace2" to start this reduction, but with the knowledge that it isn't sufficient, yet. Thanks, -Stolee