Uninitialized static variables on x86_64

Bug #254025 reported by Gerald Combs
2
Affects Status Importance Assigned to Milestone
gcc
Won't Fix
Medium
gcc-4.1 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: gcc-4.1

[ Note: This is a bounce from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37001 ]

Wireshark's Buildbot system recently uncovered what appears to be a bug in gcc. The following code:

    static guint tap_current=0;
    [ ... ]
    fprintf(stderr, "dissect_bssmap tap_current: %u\n", tap_current);

produces the following output:

dissect_bssmap tap_current: 2801996644

'lsb_release -rd' output:
Description: Ubuntu 7.10
Release: 7.10

'dpkg -l | grep gcc' output:

ii gcc 4:4.1.2-9ubuntu2 The GNU C compiler
ii gcc-3.3-base 1:3.3.6-15ubuntu2 The GNU Compiler Collection (base package)
ii gcc-4.1 4.1.2-16ubuntu2 The GNU C compiler
ii gcc-4.1-base 4.1.2-16ubuntu2 The GNU Compiler Collection (base package)
ii gcc-4.2-base 4.2.1-5ubuntu4 The GNU Compiler Collection (base package)
ii lib32gcc1 1:4.2.1-5ubuntu4 GCC support library (32 bit Version)
ii libgcc1 1:4.2.1-5ubuntu4 GCC support library

'gcc -v' output:
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

Steps to reproduce:

  Download a recent Wireshark tarball from
  http://www.wireshark.org/download/automated/src/ or check out from SVN at
  http://anonsvn.wireshark.org/wireshark/trunk/

  Apply the attached patch and build Wireshark.

  Download the capture file from

http://www.wireshark.org/download/automated/captures/fuzz-2008-07-31-3587.pcap

  Run './tshark -nVr /tmp/fuzz-2008-07-31-3587.pcap > /dev/null 2> /tmp/tp.out; head -10 /tmp/tp.out'

You should see something like the following:

dissect_bssmap tap_current: 2801996644
dissect_bssmap tap_current: 0
dissect_bssmap tap_current: 1
dissect_dtap tap_current: 2801996612
dissect_bssmap tap_current: 2
dissect_dtap tap_current: 0
dissect_bssmap tap_current: 3
dissect_dtap tap_current: 1
dissect_bssmap tap_current: 0
dissect_bssmap tap_current: 1

Sorry I don't have a smaller test case.

Revision history for this message
Gerald Combs (gerald.combs) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

closed by upstream as won't fix.

Changed in gcc-4.1 (Ubuntu):
status: New → Won't Fix
Changed in gcc:
status: Unknown → Won't Fix
Changed in gcc:
importance: Unknown → Medium
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.