g++ generates bad code

Bug #692104 reported by Philip Ashmore
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I put together a script called reproduce-bug.sh that does all the work for you.

This script doesn't require sudo or other enhanced proviledges to run.
Basically you run the script in an empty directory writeable by you, and
it will git clone v3c and treedb into their own
folders and create a "sandbox" folder to install them to.
Then it will "make && make install" the packages into the sandbox.

You run it as

   sh reproduce-bug.sh treedb

These packages aren't large and with a 1-2GHz machine with broadband
you should get to the "problem" prompt in < 2 minutes.

The problem stage is running "make check" in treedb, so there's a prompt
asking you to <Ctrl>-C to abort, enter to proceed.

If you can reproduce the bug it will note the test failures for you to compare.

Running the tests on Debian/Squeeze's gcc/g++ 4.4.5 succeeds, as it does
with gcc/g++ 4.5.2 on ubuntu (I built it from source).

This may lead to the cause of the following more serious problems:

   linux-image-2.6.32-5-amd64: kernel freeze
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607495

and

   system instability caused by unpriviledged program
   https://bugs.launchpad.net/ubuntu/+source/linux/+bug/692100

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: g++ 4:4.4.4-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-26.48-generic 2.6.32.24+drm33.11
Uname: Linux 2.6.32-26-generic x86_64
Architecture: amd64
Date: Sun Dec 19 03:23:14 2010
ProcEnviron:
 LANGUAGE=
 LANG=en_IE.utf8
 SHELL=/bin/bash
SourcePackage: gcc-defaults

Revision history for this message
Philip Ashmore (contact-philipashmore) wrote :
Revision history for this message
Philip Ashmore (contact-philipashmore) wrote :

g++ -v reports
   gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)

Revision history for this message
Philip Ashmore (contact-philipashmore) wrote :

I booted into Ubuntu just now and discovered that I was running an old kernel - the one in the bug report.
I hand-edit grub.cfg as I have Ubuntu + Debian/Lenny + Debian/Squeeze installed.

Anyway, no change - my system still freezes.

Revision history for this message
Philip Ashmore (contact-philipashmore) wrote :

2.6.35-24

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

please can you recheck with GCC 4.8 in trusty?

Changed in gcc-defaults (Ubuntu):
status: New → Incomplete
Revision history for this message
Philip Ashmore (contact-philipashmore) wrote :

Working with latest v3c and treedb with gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) in trusty.
I got a link error with the original reproduce-bug.sh which might be due to
 - tool changes
 - the git versions used (the revised script uses the "master" branches
 - a bad "clean room" on my machine

I'm guessing I couldn't save/upload a log as the problem crashed the machine.

Has anyone tried to reproduce this bug?

Any way the problem appears solved.

Changed in gcc-defaults (Ubuntu):
status: Incomplete → New
Revision history for this message
Juhani Numminen (jsonic) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in gcc-defaults (Ubuntu):
status: New → Invalid
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.