On Fri, Jan 21, 2011 at 7:29 PM, Kurt Stephens <ks / kurtstephens.com> wrote:

> I've been drilling deep into MRI's gc.
> Does anyone regularly run MRI against valgrind?
> I'm seeing quite a few errors on OS X 10.6.6 64-bit.
>
> e.g.:
>
> ==36412== Use of uninitialised value of size 8
> ==36412==    at 0x100054542: mark_current_machine_context (in ./ruby)
> ==36412==    by 0x10005473A: gc_marks (in ./ruby)
> ==36412==    by 0x1000558EA: rb_newobj (in ./ruby)
> ==36412==    by 0x100055E48: rb_node_newnode (in ./ruby)
> ==36412==    by 0x100099AA4: gettable_gen (in ./ruby)
> ==36412==    by 0x1000B752E: ruby_yyparse (in ./ruby)
> ==36412==    by 0x1000B8FC9: yycompile0 (in ./ruby)
> ==36412==    by 0x10017F7A2: thread_suppress_tracing (in ./ruby)
> ==36412==    by 0x100096E1F: rb_parser_compile_file (in ./ruby)
> ==36412==    by 0x1000FBC1B: load_file_internal (in ./ruby)
> ==36412==    by 0x10003C5CE: rb_ensure (in ./ruby)
> ==36412==    by 0x1000F950D: rb_load_file (in ./ruby)
> ==36412==
> ==36412== Conditional jump or move depends on uninitialised value(s)
> ==36412==    at 0x100051CAB: gc_mark_children (in ./ruby)
> ==36412==    by 0x100054622: mark_current_machine_context (in ./ruby)
> ==36412==    by 0x10005473A: gc_marks (in ./ruby)
> ==36412==    by 0x1000558EA: rb_newobj (in ./ruby)
> ==36412==    by 0x100055E48: rb_node_newnode (in ./ruby)
> ==36412==    by 0x100099AA4: gettable_gen (in ./ruby)
> ==36412==    by 0x1000B752E: ruby_yyparse (in ./ruby)
> ==36412==    by 0x1000B8FC9: yycompile0 (in ./ruby)
> ==36412==    by 0x10017F7A2: thread_suppress_tracing (in ./ruby)
> ==36412==    by 0x100096E1F: rb_parser_compile_file (in ./ruby)
> ==36412==    by 0x1000FBC1B: load_file_internal (in ./ruby)
> ==36412==    by 0x10003C5CE: rb_ensure (in ./ruby)
>
>
When I'm running valgrind against MRI I use

  --partial-loads-ok=yes --undef-value-errors=no

to hide these messages, which have never, in my experience, been of any use
when debugging issues with C extensions.