[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 30 03:14:57 PST 2024


ChuanqiXu9 wrote:

> I am not saying it's a bad idea to add this for testing purposes, but given how fragile this approach is, I think we should not provide configuration knobs to users there. At least everyone sees crashes at roughly the same points right now (although variation is still present because depending on inlining decisions stacks sizes might vary even with the same code and same limits).

Sorry for not being clear enough. What I want is to add parameters to `clang::runWithSufficientStackSpace` and we can invoke it and test this in unittest. It won't be visible to users.

BTW, how about the idea of using ASTReader::NumCurrentElementsDeserializing?


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


More information about the cfe-commits mailing list