http://bugzilla.novell.com/show_bug.cgi?id=582783
http://bugzilla.novell.com/show_bug.cgi?id=582783#c0
Summary: nasm crashes with MALLOC_CHECK
Classification: openSUSE
Product: openSUSE 11.3
Version: Factory
Platform: Other
OS/Version: Other
Status: NEW
Severity: Critical
Priority: P5 - None
Component: Development
AssignedTo: pth@novell.com
ReportedBy: coolo@novell.com
QAContact: qa@suse.de
Found By: ---
Blocker: ---
It fails when building several packages. Please fix
abuild@desdemona:/usr/src/packages/BUILD/syslinux-3.83/modules> valgrind nasm
-O99 -felf -o libio.o -l libio.lst libio.asm
==22638== Memcheck, a memory error detector
==22638== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==22638== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==22638== Command: nasm -O99 -felf -o libio.o -l libio.lst libio.asm
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B24: rb_insert (rbtree.c:34)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B17: rb_insert (rbtree.c:66)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B9D: rb_insert (rbtree.c:34)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B33: rb_insert (rbtree.c:34)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B24: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B17: rb_insert (rbtree.c:66)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B9D: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B33: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B24: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B17: rb_insert (rbtree.c:66)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B9D: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B33: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B24: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638== Conditional jump or move depends on uninitialised value(s)
==22638== at 0x406B9D: rb_insert (rbtree.c:34)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x406B60: rb_insert (rbtree.c:77)
==22638== by 0x415C5B: elf_deflabel (outelf32.c:676)
==22638== by 0x40C51B: redefine_label (labels.c:230)
==22638== by 0x40D68F: parse_line (parser.c:220)
==22638== by 0x4034CF: main (nasm.c:1486)
==22638==
==22638==
==22638== HEAP SUMMARY:
==22638== in use at exit: 853 bytes in 30 blocks
==22638== total heap usage: 39,528 allocs, 39,498 frees, 5,426,122 bytes
allocated
==22638==
==22638== LEAK SUMMARY:
==22638== definitely lost: 569 bytes in 25 blocks
==22638== indirectly lost: 12 bytes in 2 blocks
==22638== possibly lost: 0 bytes in 0 blocks
==22638== still reachable: 272 bytes in 3 blocks
==22638== suppressed: 0 bytes in 0 blocks
==22638== Rerun with --leak-check=full to see details of leaked memory
==22638==
==22638== For counts of detected and suppressed errors, rerun with: -v
==22638== Use --track-origins=yes to see where uninitialised values come from
==22638== ERROR SUMMARY: 28 errors from 14 contexts (suppressed: 2 from 2)
abuild@desdemona:/usr/src/packages/BUILD/syslinux-3.83/modules> ^C
abuild@desdemona:/usr/src/packages/BUILD/syslinux-3.83/modules> gdb nasm -O99
-felf -o libio.o -l libio.lst libio.asm
gdb: unrecognized option '-O99'
Use `gdb --help' for a complete list of options.
abuild@desdemona:/usr/src/packages/BUILD/syslinux-3.83/modules> gdb --args nasm
-O99 -felf -o libio.o -l libio.lst libio.asm
GNU gdb (GDB) SUSE (7.0-1.22)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/nasm...Reading symbols from
/usr/lib/debug/usr/bin/nasm.debug...done.
done.
(gdb) run
Starting program: /usr/bin/nasm -O99 -felf -o libio.o -l libio.lst libio.asm
Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C
"debuginfo(build-id)=ba76136319fe5f87ba8138620a1e03a5628b52aa"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C
"debuginfo(build-id)=5d9701e666ce2fbb32fdb701bf39755011456622"
Program received signal SIGSEGV, Segmentation fault.
0x0000000000406b26 in is_red (h=0xbabababababababa) at rbtree.c:34
34 return h && h->red;
(gdb) where
#0 0x0000000000406b26 in is_red (h=0xbabababababababa) at rbtree.c:34
#1 rb_insert (h=0xbabababababababa) at rbtree.c:71
#2 0x0000000000415c5c in elf_deflabel (name=0x6ff410 "getchar", segment=<value
optimized out>, offset=393, is_global=<value optimized out>, special=0x0) at
output/outelf32.c:676
#3 0x000000000040c51c in redefine_label (label=<value optimized out>,
segment=12, offset=393, special=0x0, is_norm=<value optimized out>,
isextrn=<value optimized out>,
ofmt=0x693780, error=0x401f40