pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rustc panic



On Thu, Jul 27, 2017 at 12:52:07PM +0900, iquiw wrote:
> FWIW, the error happens here [1].
> 
> I tried a sample code that I translated the relevant logic from Rust
> to C, but the problem did not happen. (guardsize is not 0)
> 
> [1] https://github.com/rust-lang/rust/blob/1.19.0/src/libstd/sys/unix/thread.rs#L329

Something is strange, I don't see any calls into pthread_attr_getguardsize
in gdb (nor in the asm looing at the call site):

thread '<unnamed>' panicked at 'there is no guard page',
+/checkout/src/libstd/sys/unix/thread.rs:329
note: Run with `RUST_BACKTRACE=1` for a backtrace.
fatal runtime error: failed to initiate panic, error 5
[Inferior 1 (LWP 0) exited with code 01]
(gdb) info break
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x000076831aa0a46f in pthread_attr_init
                                                  at
+/work/src/lib/libpthread/pthread_attr.c:75
        breakpoint already hit 3 times
2       breakpoint     keep y   0x000076831aa0a546 in pthread_attr_getguardsize
+at /work/src/lib/libpthread/pthread_attr.c:152

I see calls to pthread_attr_getstack(), which work and provide good values,
but that would be past the "panic!" macro in the code already...

I am confused

Martin


Home | Main Index | Thread Index | Old Index