[racket] FFI crashing Racket

From: Evgeny Odegov (evgeny-odegov at mail.ru)
Date: Thu Oct 16 10:40:00 EDT 2014

I didn't know about things explained in the message by link 
http://lists.racket-lang.org/dev/archive/2014-March/013984.html .
So, I've made tests again:

user$ gdb -q --args racket clang_ffi_crash.rkt
Reading symbols from /usr/bin/racket...(no debugging symbols found)...done.
(gdb) handle SIGSEGV nostop noprint
Signal        Stop    Print    Pass to program    Description
SIGSEGV       No    No    Yes        Segmentation fault
(gdb) run
Starting program: /usr/bin/racket clang_ffi_crash.rkt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb74c3b40 (LWP 15455)]
138124288
[Thread 0xb74c3b40 (LWP 15455) exited]
[Inferior 1 (process 15452) exited normally]


user$ gdb -q --args racket --eval "(require (file 
\"/home/user/clang_ffi_crash.rkt\"))"
Reading symbols from /usr/bin/racket...(no debugging symbols found)...done.
(gdb) handle SIGSEGV nostop noprint
Signal        Stop    Print    Pass to program    Description
SIGSEGV       No    No    Yes        Segmentation fault
(gdb) run
Starting program: /usr/bin/racket --eval \(require\ \(file\ 
\"/home/user/clang_ffi_crash.rkt\"\)\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb74c3b40 (LWP 15150)]

Program received signal SIGABRT, Aborted.
0x00132416 in __kernel_vsyscall ()
(gdb) backtrace
#0  0x00132416 in __kernel_vsyscall ()
#1  0x001b3e0f in __GI_raise (sig=6)
     at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x001b7455 in __GI_abort () at abort.c:91
#3  0x0829233d in fault_handler ()
#4  <signal handler called>
#5  0x081f7ea6 in scheme_load_delayed_code ()
#6  0x0809451f in scheme_delay_load_closure ()
#7  0x080d4291 in ?? ()
#8  0x080e423a in scheme_on_demand_with_args ()
#9  0x080e4267 in scheme_on_demand ()
#10 0x0033088e in ?? ()
#11 0x0809a630 in scheme_do_eval ()
#12 0x080b8c78 in ?? ()
#13 0x0033fada in ?? ()
#14 0x0809a630 in scheme_do_eval ()
#15 0x0813be14 in ?? ()
#16 0x08098fb6 in scheme_do_eval ()
#17 0x080bddc8 in scheme_finish_apply_for_prompt ()
#18 0x080bdfb9 in scheme_apply_for_prompt ()
#19 0x080c382e in ?? ()
#20 0x0809a1e9 in scheme_do_eval ()
#21 0x080b6f7d in ?? ()
---Type <return> to continue, or q <return> to quit---
#22 0x08145857 in scheme_module_run_finish ()
#23 0x0032e085 in ?? ()
#24 0x08129718 in scheme_module_run_start ()
#25 0x08148236 in ?? ()
#26 0x0814831b in ?? ()
#27 0x08148988 in ?? ()
#28 0x08152f57 in ?? ()
#29 0x08154a98 in ?? ()
#30 0x081628d5 in scheme_top_level_require_execute ()
#31 0x0809a05a in scheme_do_eval ()
#32 0x0809be5c in ?? ()
#33 0x0809c1d9 in _scheme_eval_compiled_multi ()
#34 0x08099376 in scheme_do_eval ()
#35 0x080be158 in scheme_finish_apply_for_prompt ()
#36 0x080be349 in scheme_apply_for_prompt ()
#37 0x080c3c2e in ?? ()
#38 0x0809a5a9 in scheme_do_eval ()
#39 0x080ad438 in ?? ()
#40 0x080b64b3 in scheme_top_level_do_worker ()
#41 0x080b66f7 in scheme_top_level_do ()
#42 0x080b7349 in ?? ()
#43 0x08094ba2 in scheme_eval_multi_with_prompt ()
#44 0x0809c558 in ?? ()
---Type <return> to continue, or q <return> to quit---
#45 0x08072c37 in _start ()


Is it a problem with --eval version, or maybe I do something wrong?


Posted on the users mailing list.