squidfunk / generic-linked-in-driver

A generic non-blocking linked-in driver for interfacing Erlang and C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segfault when cleaning up

ToJans opened this issue · comments

Using the latest version of this lib combined with a driver I am writing, I get a segfault during cleanup in gen_driver.c: 160.

This is the GDB dump

fdb_test: hello_world_test (module 'fdb_test')...[New Thread 0x7fffd770d700 (LWP 41859)]
/usr/local/lib/erlang/erts-5.10.3/bin/beam: 
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6f61d2a in strchrnul () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) backtrace 
#0  0x00007ffff6f61d2a in strchrnul () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6f17a60 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff6f1d1a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6f17bde in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff6fc0ce5 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007ffff6fc0e43 in error () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x00007fffd7dfb8d7 in ready (drv_data=0x7ffff66c15f8, thread_data=0x7ffff66c1a00) at deps/gen_driver/c_src/gen_driver.c:160
#7  0x000000000047c078 in async_ready (p=0x7ffff66c13b8, data=<optimized out>) at beam/io.c:4805
#8  0x00000000004d318a in call_async_ready (a=0x7ffff66c1768) at beam/erl_async.c:399
#9  erts_check_async_ready (varq=0x7ffff6531440) at beam/erl_async.c:549
#10 0x0000000000485968 in handle_async_ready (aux_work=64, awdp=<optimized out>, waiting=<optimized out>) at beam/erl_process.c:1247
#11 handle_aux_work (awdp=0x7ffff64c02c0, orig_aux_work=<optimized out>, waiting=<optimized out>) at beam/erl_process.c:1743
#12 0x0000000000489174 in scheduler_wait (rq=0x7ffff64c0080, esdp=0x7ffff64c0280, fcalls=<synthetic pointer>) at beam/erl_process.c:2435
#13 schedule (p=<optimized out>, calls=<optimized out>) at beam/erl_process.c:7017
#14 0x0000000000507adb in process_main () at beam/beam_emu.c:1198
#15 0x000000000044685f in erl_start (argc=26, argv=<optimized out>) at beam/erl_init.c:1783
#16 0x000000000042ab39 in main (argc=<optimized out>, argv=<optimized out>) at sys/unix/erl_main.c:29

Never mind, apparently I was not using the latest version 👎 . Sorry to bother you again & thanks for such a great lib!

ezoic increase your site revenue