-dumpversion output inconsistent with upstream
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.6 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Trusty |
Won't Fix
|
Undecided
|
Unassigned | ||
gcc-4.7 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Trusty |
Won't Fix
|
Undecided
|
Unassigned | ||
gcc-4.8 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Trusty |
Won't Fix
|
Undecided
|
Unassigned | ||
gcc-4.9 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Invalid
|
Undecided
|
Unassigned | ||
gccgo-4.9 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Note: this bug also affects gcc-4.6, gcc-4.7, gcc-4.8, and possibly gcc-4.9
Sometime between gcc-4.5.8 and gcc-4.6.3 debian (accidentally) changed the output of the -dumpversion flag; possibly in an attempt to fix this bug: https:/
As a result, -dumpversion now reports MAJOR.MINOR version info. This is in contrast to upstream and other distributions of gcc which report MAJOR.MINOR.PATCH version info. This prevents simple machine parsing of gcc/g++/gfortran versions to filter out misbehaving versions. (For instance gcc-4.7.0's and gcc-4.7.1's C++11 ABI incompatibilities.) This bug has trickled down through gcc-4.6, gcc-4.7, gcc-4.8, and possibly gcc-4.9, and affects their binary packages (gcc, g++, gfortran, others?).
This bug can be fixed by applying the attached patch, after "debian patching".
Additional information:
1) Ubuntu version
[maru:~] lsb_release -rd
Description: Ubuntu 14.04.1 LTS
Release: 14.04
2) package version
[maru:~] apt-cache policy gcc-4.8
gcc-4.8:
Installed: 4.8.2-19ubuntu1
Candidate: 4.8.2-19ubuntu1
Version table:
*** 4.8.2-19ubuntu1 0
500 http://
100 /var/lib/
3) What do you expect to happen?
[avnas:~] lsb_release -rd
Description: Fedora release 20 (Heisenbug)
Release: 20
[avnas:~] gcc --version
gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[avnas:~] gcc -dumpversion
4.8.2
[avnas:~] g++ -dumpversion
4.8.2
[avnas:~] gfortran -dumpversion
4.8.2
4) What happened instead?
[maru:~] lsb_release -rd
Description: Ubuntu 14.04.1 LTS
Release: 14.04
[maru:~] gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[maru:~] gcc -dumpversion
4.8
[maru:~] g++ -dumpversion
4.8
[maru:~] gfortran -dumpversion
4.8
CVE References
Changed in gcc-4.6 (Ubuntu Trusty): | |
status: | New → Won't Fix |
Changed in gcc-4.7 (Ubuntu Trusty): | |
status: | New → Won't Fix |
Changed in gcc-4.8 (Ubuntu Trusty): | |
status: | New → Won't Fix |
Changed in gcc-4.9 (Ubuntu Trusty): | |
status: | New → Invalid |
Changed in gccgo-4.9 (Ubuntu): | |
status: | New → Invalid |
In the previously listed debian bug report, the change happend in Source: gcc-4.6, Source-Version: 4.6.1-14