Valgrind reports "Conditional jump or move depends on uninitialised value"

Bug #202885 reported by John McCabe-Dansted
2
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: bash

This problem also occurs on 7.10 (As well as Hardy). This only seems to occur when using the "set" command to list the shell variables. Exact errors reported as below:

$ valgrind bash -c "set ; exit 0" > /dev/null
==8226== Memcheck, a memory error detector.
==8226== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==8226== Using LibVEX rev 1804, a library for dynamic binary translation.
==8226== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==8226== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation framework.
==8226== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==8226== For more details, rerun with: -v
==8226==
==8226== Conditional jump or move depends on uninitialised value(s)
==8226== at 0x80950BA: array_to_assign (in /bin/bash)
==8226== by 0x8095843: print_array_assignment (in /bin/bash)
==8226== by 0x8077EEB: print_assignment (in /bin/bash)
==8226== by 0x8077F7F: print_var_list (in /bin/bash)
==8226== by 0x80AE149: set_builtin (in /bin/bash)
==8226== by 0x806F399: (within /bin/bash)
==8226== by 0x8073070: (within /bin/bash)
==8226== by 0x8071552: execute_command_internal (in /bin/bash)
==8226== by 0x806FAD2: execute_command (in /bin/bash)
==8226== by 0x80709E1: (within /bin/bash)
==8226== by 0x80714BF: execute_command_internal (in /bin/bash)
==8226== by 0x80A7F4A: parse_and_execute (in /bin/bash)
==8226==
==8226== Conditional jump or move depends on uninitialised value(s)
==8226== at 0x80950C7: array_to_assign (in /bin/bash)
==8226== by 0x8095843: print_array_assignment (in /bin/bash)
==8226== by 0x8077EEB: print_assignment (in /bin/bash)
==8226== by 0x8077F7F: print_var_list (in /bin/bash)
==8226== by 0x80AE149: set_builtin (in /bin/bash)
==8226== by 0x806F399: (within /bin/bash)
==8226== by 0x8073070: (within /bin/bash)
==8226== by 0x8071552: execute_command_internal (in /bin/bash)
==8226== by 0x806FAD2: execute_command (in /bin/bash)
==8226== by 0x80709E1: (within /bin/bash)
==8226== by 0x80714BF: execute_command_internal (in /bin/bash)
==8226== by 0x80A7F4A: parse_and_execute (in /bin/bash)
==8226==
==8226== Conditional jump or move depends on uninitialised value(s)
==8226== at 0x80950D4: array_to_assign (in /bin/bash)
==8226== by 0x8095843: print_array_assignment (in /bin/bash)
==8226== by 0x8077EEB: print_assignment (in /bin/bash)
==8226== by 0x8077F7F: print_var_list (in /bin/bash)
==8226== by 0x80AE149: set_builtin (in /bin/bash)
==8226== by 0x806F399: (within /bin/bash)
==8226== by 0x8073070: (within /bin/bash)
==8226== by 0x8071552: execute_command_internal (in /bin/bash)
==8226== by 0x806FAD2: execute_command (in /bin/bash)
==8226== by 0x80709E1: (within /bin/bash)
==8226== by 0x80714BF: execute_command_internal (in /bin/bash)
==8226== by 0x80A7F4A: parse_and_execute (in /bin/bash)
==8226==
==8226== Conditional jump or move depends on uninitialised value(s)
==8226== at 0x40239DB: strlen (mc_replace_strmem.c:242)
==8226== by 0x80951E0: array_to_assign (in /bin/bash)
==8226== by 0x8095843: print_array_assignment (in /bin/bash)
==8226== by 0x8077EEB: print_assignment (in /bin/bash)
==8226== by 0x8077F7F: print_var_list (in /bin/bash)
==8226== by 0x80AE149: set_builtin (in /bin/bash)
==8226== by 0x806F399: (within /bin/bash)
==8226== by 0x8073070: (within /bin/bash)
==8226== by 0x8071552: execute_command_internal (in /bin/bash)
==8226== by 0x806FAD2: execute_command (in /bin/bash)
==8226== by 0x80709E1: (within /bin/bash)
==8226== by 0x80714BF: execute_command_internal (in /bin/bash)
==8226==
==8226== Conditional jump or move depends on uninitialised value(s)
==8226== at 0x40239E7: strlen (mc_replace_strmem.c:242)
==8226== by 0x80951E0: array_to_assign (in /bin/bash)
==8226== by 0x8095843: print_array_assignment (in /bin/bash)
==8226== by 0x8077EEB: print_assignment (in /bin/bash)
==8226== by 0x8077F7F: print_var_list (in /bin/bash)
==8226== by 0x80AE149: set_builtin (in /bin/bash)
==8226== by 0x806F399: (within /bin/bash)
==8226== by 0x8073070: (within /bin/bash)
==8226== by 0x8071552: execute_command_internal (in /bin/bash)
==8226== by 0x806FAD2: execute_command (in /bin/bash)
==8226== by 0x80709E1: (within /bin/bash)
==8226== by 0x80714BF: execute_command_internal (in /bin/bash)
==8226==
==8226== ERROR SUMMARY: 60 errors from 5 contexts (suppressed: 15 from 1)
==8226== malloc/free: in use at exit: 0 bytes in 0 blocks.
==8226== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==8226== For counts of detected errors, rerun with: -v
==8226== All heap blocks were freed -- no leaks are possible.

ProblemType: Bug
Architecture: i386
Date: Sun Mar 16 15:32:42 2008
DistroRelease: Ubuntu 8.04
Package: bash 3.2-0hostname14
PackageArchitecture: i386
SourcePackage: bash
Uname: Linux 2.6.24-11-generic i686

Tags: apport-bug
Revision history for this message
John McCabe-Dansted (gmatht) wrote :
Matthias Klose (doko)
Changed in bash:
importance: Undecided → Medium
status: New → Confirmed
Mika Fischer (zoop)
Changed in bash:
status: Confirmed → Triaged
Revision history for this message
tomward (tomwardathome) wrote :
Download full text (5.9 KiB)

This problem occurs in 9.04 as well with at least true, grep and xpdf, may occur with all programs.
This did not ocurr in 8.10

tt2tjw@shed:/projects$ valgrind true
==10513== Memcheck, a memory error detector.
==10513== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==10513== Using LibVEX rev 1854, a library for dynamic binary translation.
==10513== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==10513== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
==10513== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==10513== For more details, rerun with: -v
==10513==
==10513== Conditional jump or move depends on uninitialised value(s)
==10513== at 0x4018227: strlen (in /lib/ld-2.9.so)
==10513== by 0x40054B2: fillin_rpath (in /lib/ld-2.9.so)
==10513== by 0x4006FB8: _dl_init_paths (in /lib/ld-2.9.so)
==10513== by 0x40034B9: dl_main (in /lib/ld-2.9.so)
==10513== by 0x4016364: _dl_sysdep_start (in /lib/ld-2.9.so)
==10513== by 0x40013E1: _dl_start (in /lib/ld-2.9.so)
==10513== by 0x4000A97: (within /lib/ld-2.9.so)
==10513== by 0x0: ???
==10513== by 0x7FEFFFA8A: ???
==10513==
==10513== Conditional jump or move depends on uninitialised value(s)
==10513== at 0x4017FEE: index (in /lib/ld-2.9.so)
==10513== by 0x400694A: expand_dynamic_string_token (in /lib/ld-2.9.so)
==10513== by 0x4008B83: _dl_map_object (in /lib/ld-2.9.so)
==10513== by 0x400184A: map_doit (in /lib/ld-2.9.so)
==10513== by 0x400E8C5: _dl_catch_error (in /lib/ld-2.9.so)
==10513== by 0x400174E: do_preload (in /lib/ld-2.9.so)
==10513== by 0x400507D: dl_main (in /lib/ld-2.9.so)
==10513== by 0x4016364: _dl_sysdep_start (in /lib/ld-2.9.so)
==10513== by 0x40013E1: _dl_start (in /lib/ld-2.9.so)
==10513== by 0x4000A97: (within /lib/ld-2.9.so)
==10513== by 0x0: ???
==10513== by 0x7FEFFFA8A: ???
==10513==
==10513== Conditional jump or move depends on uninitialised value(s)
==10513== at 0x4017FF9: index (in /lib/ld-2.9.so)
==10513== by 0x400694A: expand_dynamic_string_token (in /lib/ld-2.9.so)
==10513== by 0x4008B83: _dl_map_object (in /lib/ld-2.9.so)
==10513== by 0x400184A: map_doit (in /lib/ld-2.9.so)
==10513== by 0x400E8C5: _dl_catch_error (in /lib/ld-2.9.so)
==10513== by 0x400174E: do_preload (in /lib/ld-2.9.so)
==10513== by 0x400507D: dl_main (in /lib/ld-2.9.so)
==10513== by 0x4016364: _dl_sysdep_start (in /lib/ld-2.9.so)
==10513== by 0x40013E1: _dl_start (in /lib/ld-2.9.so)
==10513== by 0x4000A97: (within /lib/ld-2.9.so)
==10513== by 0x0: ???
==10513== by 0x7FEFFFA8A: ???
==10513==
==10513== Conditional jump or move depends on uninitialised value(s)
==10513== at 0x4018004: index (in /lib/ld-2.9.so)
==10513== by 0x400694A: expand_dynamic_string_token (in /lib/ld-2.9.so)
==10513== by 0x4008B83: _dl_map_object (in /lib/ld-2.9.so)
==10513== by 0x400184A: map_doit (in /lib/ld-2.9.so)
==10513== by 0x400E8C5: _dl_catch_error (in /lib/ld-2.9.so)
==10513== by 0x400174E: do_preload (in /lib/ld-2.9.so)
==10513== by 0x400507D: dl_main (in /lib/ld-2.9.so)
==10513== by 0x4016364: _dl_sysdep_start (in /lib/ld-2.9.so)
==...

Read more...

Revision history for this message
Matthias Klose (doko) wrote :

not seen anymore with bash-4.0 in karmic (although you see glibc-2.10 related diagnostics which should go away with an update to valgrind-3.5).

Changed in bash (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.