[clang] [clang] Fix the crash when dumping deserialized decls (PR #133395)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 28 03:49:52 PDT 2025
hokein wrote:
> There are two parts to this patch:
>
> 1. forwarding more methods properly
> 2. updating the interface, adding new callbacks and changing the behavior of `-dump-deserialized-decls``
>
> I think (1) is a no-brainer. I would be very eager to LGTM it right away, but could you send it as a separate PR? (Especially if it fixes the crash)
>
> The part (2) is a bit more complicated and it would be great to explore the solution space a little more. I've left a comment about reentrancy into the callback that worries me, please take a look.
>
> Another point that we want to be explicit about is that this would change the buffering of `-dump-deserialized-decls`. It's definitely better than crashing, but we should at least mention in the patch description that the we are now doing extra buffering and certain declarations might be printed later than before.
Applying only (1) will not fix the crash, as the issue with calling printQualifiedName in the middle of deserialization still remains.
I'm happy to split the patch. I agree that (2) requires more thought and careful consideration. I'm not sure I'll have time to finish it before my leave, so I might have to leave it to you. But I can take care of (1).
https://github.com/llvm/llvm-project/pull/133395
More information about the cfe-commits
mailing list