From: Tanaka Akira Date: 2007-06-28T12:41:01+09:00 Subject: [ruby-dev:31077] Conditional jump or move depends on uninitialised value(s) in StringIO.new("a").gets("\n") valgrind 下で StringIO.new("a").gets("\n") とすると、 strio_getline で Conditional jump or move depends on uninitialised value(s) となります。 % valgrind ./ruby -rstringio -ve 'StringIO.new("a").gets("\n")' ==12270== Memcheck, a memory error detector. ==12270== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==12270== Using LibVEX rev 1658, a library for dynamic binary translation. ==12270== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==12270== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework. ==12270== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==12270== For more details, rerun with: -v ==12270== --12270-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --12270-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --12270-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --12270-- DWARF2 CFI reader: unhandled CFI instruction 0:50 ruby 1.9.0 (2007-06-28 patchlevel 0) [i686-linux] ... ==12270== Conditional jump or move depends on uninitialised value(s) ==12270== at 0x402892E: strio_getline (stringio.c:807) ==12270== by 0x4028D92: strio_gets (stringio.c:872) ==12270== by 0x80E5967: call_cfunc (insnhelper.ci:270) ==12270== by 0x80EE1F7: vm_call_cfunc (insnhelper.ci:359) ==12270== by 0x80EDEA2: vm_call_method (insnhelper.ci:520) ==12270== by 0x80EA2D6: vm_eval (insns.def:1194) ==12270== by 0x80EE33D: vm_eval_body (vm.c:1150) ==12270== by 0x80EE97A: rb_thread_eval (vm.c:1358) ==12270== by 0x80EFCBD: yarvcore_eval_iseq (yarvcore.c:97) ==12270== by 0x80EFDB7: yarvcore_eval_parsed (yarvcore.c:129) ==12270== by 0x8059C0F: ruby_exec_internal (eval.c:228) ==12270== by 0x8059C4C: ruby_exec (eval.c:243) ==12270== ==12270== Conditional jump or move depends on uninitialised value(s) ==12270== at 0x4028939: strio_getline (stringio.c:807) ==12270== by 0x4028D92: strio_gets (stringio.c:872) ==12270== by 0x80E5967: call_cfunc (insnhelper.ci:270) ==12270== by 0x80EE1F7: vm_call_cfunc (insnhelper.ci:359) ==12270== by 0x80EDEA2: vm_call_method (insnhelper.ci:520) ==12270== by 0x80EA2D6: vm_eval (insns.def:1194) ==12270== by 0x80EE33D: vm_eval_body (vm.c:1150) ==12270== by 0x80EE97A: rb_thread_eval (vm.c:1358) ==12270== by 0x80EFCBD: yarvcore_eval_iseq (yarvcore.c:97) ==12270== by 0x80EFDB7: yarvcore_eval_parsed (yarvcore.c:129) ==12270== by 0x8059C0F: ruby_exec_internal (eval.c:228) ==12270== by 0x8059C4C: ruby_exec (eval.c:243) ... -- [田中 哲][たなか あきら][Tanaka Akira]