Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Requesting review.
The patch does not include an automated test because this is fixing a bug report with no test case (I spotted the issue by inspection based on the stack trace). The bug reporter did try the patch locally and confirm that it fixes the crash on their codebase.
Comment Actions
I believe the fix is correct.
Though the fix has been verified by a real-world example, I think it would be nice to get a reproducible testcase. Looking at the stacktrace:
- the crash occurs during the pch deserialization
- and we miss handling the case where LValue base is a DynamicAllocLValue
so it looks like we can construct a DynamicAllocLValue case, and try to deserialize it (e.g. emitting a pch), and it should reproduce the crash.
Comment Actions
I gave it a try, here is a testcase that triggers the crash
// clang -cc1 -emit-pch -o /tmp/t.pch /tmp/t.cpp #ifndef HEADER #define HEADER struct A { int *p; }; const A &w = A{ new int(10) }; #endif