Hi,

Just getting back to ruby coding and noticed it doesn't seem to clean up
correctly when malloc flag 'C' is enabled. 

When ruby process is aborted, like starting "ruby" from cli and pressing ^D it 
prints out:
tmy@phobos home $ ruby
ruby(90150) in free(): chunk canary corrupted 0x11c714984000 0x3fd8@0x3fd8
Abort trap 
tmy@phobos home $

Here's the backtrace for it.
(gdb) bt
#0  0x000010efdd17157a in thrkill () at {standard input}:5
#1  0x000010efdd1a7db9 in *_libc_abort () at /usr/src/lib/libc/stdlib/abort.c:52
#2  0x000010efdd1a9bf6 in wrterror (d=0x7f7ffffef2e0, msg=0x10efdd2e7718 "chunk 
canary corrupted %p %#tx@%#zx") at /usr/src/lib/libc/stdlib/malloc.c:306
#3  0x000010efdd1a9cd2 in validate_canary (d=Variable "d" is not available.
) at /usr/src/lib/libc/stdlib/malloc.c:1053
#4  0x000010efdd1ab289 in ofree (argpool=0x10ef5ef7dab0, p=0x10ef18984000, 
clear=0, check=0, argsz=0) at /usr/src/lib/libc/stdlib/malloc.c:1359
#5  0x000010efdd1ab563 in free (ptr=0x10ef18984000) at 
/usr/src/lib/libc/stdlib/malloc.c:1439
#6  0x000010ef8c73d038 in heap_page_free () from /usr/local/lib/libruby24.so.1.0
#7  0x000010ef8c746ece in rb_objspace_free () from 
/usr/local/lib/libruby24.so.1.0
#8  0x000010ef8c83d6c0 in ruby_vm_destruct () from 
/usr/local/lib/libruby24.so.1.0
#9  0x000010ef8c7313e6 in ruby_cleanup () from /usr/local/lib/libruby24.so.1.0
#10 0x000010ef8c731562 in ruby_run_node () from /usr/local/lib/libruby24.so.1.0
#11 0x000010ed0e200670 in main () from /usr/local/bin/ruby24
Current language:  auto; currently asm

Timo

Reply via email to