Actions
Bug #17794
closedaddr2line.c can free(3) an invalid pointer without zlib
Description
When built without zlib (./configure ac_cv_lib_z_uncompress=no
), ruby
aborts immediately after C level backtrace information is printed.
$ ruby -e 'Process.kill :SEGV, $$'
-e:1: [BUG] Segmentation fault at 0x000003e8000052ac
(...snip...)
-- C level backtrace information -------------------------------------------
/var/tmp/build.debug/x86_64-linux-gcc/lib/libruby.so.3.1(0x7f8abe871147) [0x7f8abe871147]
[0x7f8abe871179]
(...snip...)
[0x7f8abe65b5fa]
/var/tmp/build.debug/x86_64-linux-gcc/bin/ruby(main+0x7f) [0x55d1e2fd1234] ../main.c:47
free(): invalid pointer
Aborted
This happens because at addr2line.c:2344 s->ptr
can be an invalid pointer.
A patch is attached for a workaround that makes s->ptr
either valid or NULL
.
Files
Actions
Like0
Like0Like0Like0Like0Like0Like0