This repository has been archived by the owner on May 21, 2019. It is now read-only.
forked from llvm-mirror/lldb
-
Notifications
You must be signed in to change notification settings - Fork 6
Segfault @ RustASTContext::FindEnumVariant #16
Comments
Thanks for the report. I'm looking into it. |
Smaller failing test:
|
In this example, I believe the One thing I don't currently understand is why |
tromey
added a commit
that referenced
this issue
Aug 7, 2018
Sometimes the DWARF can omit information about a discriminant, for example when an Option shares a discriminant slot with an enum that it wraps. In this case, lldb could crash, because the discriminant was not found and because there was no default variant. No test case because this relies on a compiler bug that will soon be fixed. Fixes #16
There's still a bug here even with the fixed debuginfo:
I think it should do something more like what gdb does:
I'll file a new bug. |
tromey
added a commit
that referenced
this issue
Aug 28, 2018
Sometimes the DWARF can omit information about a discriminant, for example when an Option shares a discriminant slot with an enum that it wraps. In this case, lldb could crash, because the discriminant was not found and because there was no default variant. No test case because this relies on a compiler bug that will soon be fixed. Fixes #16
tromey
added a commit
that referenced
this issue
Nov 27, 2018
Sometimes the DWARF can omit information about a discriminant, for example when an Option shares a discriminant slot with an enum that it wraps. In this case, lldb could crash, because the discriminant was not found and because there was no default variant. No test case because this relies on a compiler bug that will soon be fixed. Fixes #16
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am currently on:
Testcase (taken from #14):
Calling
fr v
at theprintln!
triggers the segfault.Backtrace:
It seems that
idx = -1 (m_default)
inRustEnum::FindEnumVariant
triggers the segfault because this is basically an out-of-bounds access throughFieldAt
.Not sure what's the cause here as I am also not familiar with the code (seems that a discriminant record is missing?).
The text was updated successfully, but these errors were encountered: