Skip to content
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

how_to_ontop example broken on latest 1.34.0-nightly #37

Open
apatrushev opened this issue Feb 27, 2019 · 2 comments
Open

how_to_ontop example broken on latest 1.34.0-nightly #37

apatrushev opened this issue Feb 27, 2019 · 2 comments
Labels

Comments

@apatrushev
Copy link

apatrushev commented Feb 27, 2019

x86_64 macOS
rustc 1.34.0-nightly (02c4c2892 2019-02-26)
Everything's set up!
Resuming => Yielding 0 => Got 0
Resuming => Yielding 1 => Got 1
Resuming => Yielding 2 => Got 2
Resuming => Yielding 3 => Got 3
Resuming => Yielding 4 => Got 4
Resuming => Yielding 5 => Got 5
Resuming => Yielding 6 => Got 6
Resuming => Yielding 7 => Got 7
Resuming => Yielding 8 => Got 8
Resuming => Yielding 9 => Got 9
Resuming context with unwind_stack() ontop!
Unwinding stack by panicking!
Illegal instruction: 4
@zonyitoo zonyitoo added the bug label Feb 27, 2019
@zonyitoo
Copy link
Owner

zonyitoo commented Feb 27, 2019

Debugging with LLDB, I saw it crashes at ud2 instruction..

    0x100001480 <+80>:  jmp    0x100001484               ; <+84> at how_to_ontop.rs
->  0x100001482 <+82>:  ud2
    0x100001484 <+84>:  leaq   -0x68(%rbp), %rdi
    0x100001488 <+88>:  callq  0x10000a360               ; _print at stdio.rs:743
    0x10000148d <+93>:  jmp    0x10000148f               ; <+95> at how_to_ontop.rs:43
    0x10000148f <+95>:  movq   -0x98(%rbp), %rax
    0x100001496 <+102>: movq   %rax, -0x38(%rbp)
    0x10000149a <+106>: movq   -0x90(%rbp), %rax
    0x1000014a1 <+113>: movq   %rax, -0x30(%rbp)
    0x1000014a5 <+117>: movq   -0x30(%rbp), %rax
    0x1000014a9 <+121>: movq   %rax, -0x28(%rbp)
    0x1000014ad <+125>: movq   -0x38(%rbp), %rax
    0x1000014b1 <+129>: movq   %rax, -0x20(%rbp)
    0x1000014b5 <+133>: movq   -0x28(%rbp), %rax
    0x1000014b9 <+137>: movq   -0x20(%rbp), %rcx
    0x1000014bd <+141>: movq   %rcx, (%rax)
    0x1000014c0 <+144>: xorl   %edx, %edx
    0x1000014c2 <+146>: movl   %edx, %edi
    0x1000014c4 <+148>: movl   $0x1, %esi
    0x1000014c9 <+153>: callq  0x100003050               ; alloc::alloc::exchange_malloc::hde2e5a8106125038 at alloc.rs:180
    0x1000014ce <+158>: movq   %rax, -0xa0(%rbp)
    0x1000014d5 <+165>: jmp    0x1000014d7               ; <+167> at boxed.rs
    0x1000014d7 <+167>: movq   -0xa0(%rbp), %rax
    0x1000014de <+174>: movq   %rax, -0xa8(%rbp)
    0x1000014e5 <+181>: leaq   0x2ddac(%rip), %rsi
    0x1000014ec <+188>: movq   -0xa8(%rbp), %rdi
    0x1000014f3 <+195>: callq  0x10000afe0               ; resume_unwind at panic.rs:420
    0x1000014f8 <+200>: jmp    0x100001508               ; <+216> at how_to_ontop.rs
    0x1000014fa <+202>: movl   %edx, %ecx
    0x1000014fc <+204>: movq   %rax, -0x10(%rbp)
    0x100001500 <+208>: movl   %ecx, -0x8(%rbp)
    0x100001503 <+211>: jmp    0x100001482               ; <+82> at how_to_ontop.rs:38
    0x100001508 <+216>: ud2
    0x10000150a <+218>: nopw   (%rax,%rax)

So LLVM thought there was a undefined behavior right here.

@zonyitoo
Copy link
Owner

zonyitoo commented Feb 27, 2019

The example crashes at this line. resume_unwind seems to trigger LLVM' sentinel of undefined behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants