On Fri, 7 Jul 2006 [email protected] wrote:
i’m trying to test on my box now but stable-snapshot won’t build for me. i’m
getting
i managed to build 1.8.5 without ext/dl or ext/ripper. re-running my
sample
program seems to work (does not core dump under electric fence) but the
memory
seems to grow without bound under top. i ran under valgrind and got
harp:~ > CORRUPT=1 valgrind --leak-check=yes
–workaround-gcc296-bugs=yes ruby-1.8.5/bin/ruby bug.rb
==1064== Memcheck, a memory error detector.
==1064== Copyright © 2002-2006, and GNU GPL’d, by Julian Seward et
al.
==1064== Using LibVEX rev 1606, a library for dynamic binary
translation.
==1064== Copyright © 2004-2006, and GNU GPL’d, by OpenWorks LLP.
==1064== Using valgrind-3.2.0, a dynamic binary instrumentation
framework.
==1064== Copyright © 2000-2006, and GNU GPL’d, by Julian Seward et
al.
==1064== For more details, rerun with: -v
==1064==
==1064==
==1064== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 17 from
1)
==1064== malloc/free: in use at exit: 398,835 bytes in 8,491 blocks.
==1064== malloc/free: 20,526 allocs, 12,035 frees, 155,280,147 bytes
allocated.
==1064== For counts of detected errors, rerun with: -v
==1064== searching for pointers to 8,491 not-freed blocks.
==1064== checked 604,052 bytes.
==1064==
==1064== 3,336 bytes in 162 blocks are possibly lost in loss record 3
of 10
==1064== at 0x401A6DE: malloc (vg_replace_malloc.c:149)
==1064== by 0x806A631: ruby_xmalloc (gc.c:121)
==1064== by 0x805F709: scope_dup (eval.c:8061)
==1064== by 0x805A1F7: rb_yield_0 (eval.c:5002)
==1064== by 0x805A5B5: rb_yield (eval.c:5035)
==1064== by 0x80B3E36: rb_ary_each (array.c:1130)
==1064== by 0x80662FA: call_cfunc (eval.c:5617)
==1064== by 0x805B886: rb_call0 (eval.c:5776)
==1064== by 0x805C1A8: rb_call (eval.c:6006)
==1064== by 0x8056B81: rb_eval (ruby.h:644)
==1064== by 0x805606C: rb_eval (eval.c:2905)
==1064== by 0x805BBDB: rb_call0 (eval.c:5912)
==1064==
==1064== LEAK SUMMARY:
==1064== definitely lost: 0 bytes in 0 blocks.
==1064== possibly lost: 3,336 bytes in 162 blocks.
==1064== still reachable: 395,499 bytes in 8,329 blocks.
==1064== suppressed: 0 bytes in 0 blocks.
==1064== Reachable blocks (those to which a pointer was found) are
not shown.
==1064== To see them, rerun with: --show-reachable=yes
if i run without the --workaround-gcc296-bugs=yes option (note that i am
not
using 296 but gcc 3.2.3 on Red Hat Enterprise Linux WS release 3 (Taroon
Update
7)) i get tons of these:
==1171== Invalid read of size 4
==1171== at 0x8062726: rb_thread_save_context (eval.c:10158)
==1171== by 0x806310E: rb_thread_schedule (eval.c:10718)
==1171== by 0x8064D3F: rb_thread_wait_other_threads (eval.c:12064)
==1171== by 0x8053F01: ruby_cleanup (eval.c:1567)
==1171== by 0x8053FD9: ruby_stop (eval.c:1606)
==1171== by 0x805403D: ruby_run (eval.c:1627)
==1171== by 0x8052450: main (main.c:46)
==1171== Address 0xBEFF8B38 is just below the stack ptr. To
suppress, use: --workaround-gcc296-bugs=yes
i don’t know if either error is ‘correct’ or not. thoughts?
-a