Without that patch, the test case associated to this patch segfaults in Release mode. This also makes the llvm-test-suite build fails, including in 10.0.0 rc2.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
This seems wrong to me. Discarding value names is the default and has been forever in non-assert builds.
Why is this not a bug in w/e is handling the IR?
It may totally be. Consider this review as a way to start the discussion. The problem, as it appears, is triggered when some value is parsed in non-discard mode (which is the only valid mode when parsing IR (see https://github.com/llvm/llvm-project/blob/master/llvm/lib/AsmParser/LLParser.cpp#L71)) and then the Value is destroyed. Another working patch I've experimented with modifies Value::setName and still runs the function body in discard mode if the value actually has a name. Would you prefer that approach?
Thanks for looking into this, Serge!
I used your test case to bisect where the crashing started, and ended up at 60d39479221d6bc09060f7816bcd7c54eb286603
Someone else noted that also and filed https://bugs.llvm.org/show_bug.cgi?id=44896
Ron has a fix out at https://reviews.llvm.org/D74878
I don't know which of these two is a better fix.
What do you mean by this?