[clang] [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (PR #124128)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 30 04:33:51 PST 2025


https://github.com/ilya-biryukov approved this pull request.

This LG, but I'd also ask for someone who owns this CodeGen to take a look before submitting. @cor3ntin can definitely vouch for that.

The thing that gives me a pause is that we **might** be missing many more places that are recursive during CodeGen and it'd be nice to align that it's a problem worth solving and that putting `runWithSufficientStackSpace` everywhere is something people are okay with.

Clang crashing is bad, but one could argue that we are making the code more convoluted to give good error messages and prevent the crashes in some cases.
It would be great to ensure people are aware of these readability costs and are on board (even if they are small).

https://github.com/llvm/llvm-project/pull/124128


More information about the cfe-commits mailing list