-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floating point exception when debugging with lldb on Mac OS X #29154
Comments
I'm facing the same issue with rustc 1.3.0. |
I ran into this as well. It may be a newly introduced LLDB bug since it's suddenly popped up? |
Following up on this - I built from the tip of LLDB the other day and the issue did not reproduce, so this is definitely an LLDB issue but one that has been fixed recently. I don't know how recent the fix was, but at least the bleeding edge works. Anybody else who runs into this issue - updating LLDB might help, or if it doesn't, building it from source does. |
This is still happening on lldb-360.1.70 - I'm assuming that it's been long enough that whatever fixes were in the LLDB repo a year and a half ago would have propagated by now?
|
I can't get a stack trace of LLDB due to SIP unfortunately :( |
cc @rust-lang/compiler, in case anyone can provide help. |
Hey @aturon @swgillespie, i've been getting errors in my debugger within vscode, and i think this issue is the root cause. I can still reproduce this issue, so let me know if i can help get this resolved. Rustc: Steps To Replicate
|
cc @tromey DO you know what might be going on here? |
Not offhand but it's worth trying the lldb from rustup (if it's available now, I haven't been able to check). If that still fails, I will take a look when I'm better. |
@jasonwilliams boa didn't build for me with stable rust. Is there some particular revision I could try? |
@tromey sorry about that, i was developing on it, it should build now. |
With my rust-enabled lldb on macOS, I get:
I'm not sure if this is due to the rust plugin or just general lldb bug fixes. |
@tromey sorry bit confused, is that it working properly? this is what i get, using normal lldb from MacOS
if this is an LLDB bug what do we do? |
The C++ language plugin for lldb only handles a specific subset of possible DWARF scalar encodings. In particular for The rust-enabled lldb doesn't have this problem. However, at the moment you can't easily install it (we need a rustup fix to ship first).
Sorry about the delay. I missed your question. Yes, that was the rust-enabled lldb working properly, I believe.
I think the route forward is to get the rust-enabled lldb shipping. This will insulate us from mismatches between what the clang plugin for lldb expects and what the rust compiler emits. Another possibility is patching lldb upstream. This might be worthwhile. Another idea would be to emit the rust |
If you're interested in the lldb code it is in |
I missed this question earlier, sorry! I don't know the answer, but we had a discussion about deploying the rust-enabled lldb here: rust-lang/rustup#1492 There you can see that the conclusion was to modify Maybe your editor can be patched? The thing is, if you're truly locked in to only running the system lldb, then you are just going to lose out, because upstream lldb does not want to merge the rust plugin (it's more complicated than that but it's true enough for now). |
I can confirm this works without crashing using rust-lldb. |
I think this is solved, so I am closing it. |
Here's an interesting issue I've encountered when debugging -
Option<char>
seems to trigger a floating point exception in LLDB.Environment details:
rustc 1.5.0-nightly (eafe106ef 2015-10-15)
lldb-330.0.44
Repro steps:
dwarf.rs
, with the following contents:dwarf
and see it has the correct output:dwarf
under LLDB, set a breakpoint on thing_with_char, start the program, and step once:The result is a floating point exception. The error message
makes it sound like this is DWARF-related. Also, the Option seems to be a crucial detail - this is what triggers the behavior in my program where I ran into this and also in this repro here.
LLDB's stack trace:
This could very well be a bug in lldb - it does look like it's dividing by zero.
The text was updated successfully, but these errors were encountered: