Uninitialized static variables on x86_64
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://
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-
--enable-shared --with-system-zlib --libexecdir=
--without-
--with-
--enable-
--enable-mpfr --enable-
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://
http://
Apply the attached patch and build Wireshark.
Download the capture file from
http://
Run './tshark -nVr /tmp/fuzz-
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.
Changed in gcc: | |
status: | Unknown → Won't Fix |
Changed in gcc: | |
importance: | Unknown → Medium |
closed by upstream as won't fix.