[Bug 591819] Re: compiled program segfault when -O0 is used to compile

eviom 591819 at bugs.launchpad.net
Tue Aug 30 16:42:06 UTC 2011


** Also affects: gcc-defaults via
   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50239
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/591819

Title:
  compiled program segfault when -O0 is used to compile

Status in gcc-defaults:
  Unknown
Status in “gcc-defaults” package in Ubuntu:
  Confirmed

Bug description:
  I don't know whether this is really a problem, or what not, but I'm
  attaching logs, and the program which causes it, along with every
  detail I can think of.  When I compile my code, if I compile it -O2,
  it compiles and runs fine.  if I compile it with -O0, it segfaults
  very early on in the execution.  I've made no changes to anything in
  between compiles.

  Compiling the code successfully requires the following libraries:
  opengl (mesa)
  glut (freeglut)
  curl
  FTGL (patched, see https://bugs.launchpad.net/ubuntu/+source/ftgl/+bug/485225 )

  procedure is as follows:

  ./configure
  make CFLAGS="-O0"
  src/altocumulus

  make clean
  make CFLAGS="-O2"
  src/altocumulus

  My code is pretty crappy, please ignore that, I'm still learning the basics of C.
  Regardless, the code shouldn't work with one level of optimization and fail with another.

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: gcc 4:4.4.3-1ubuntu1
  ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
  Uname: Linux 2.6.32-22-generic x86_64
  NonfreeKernelModules: nvidia
  Architecture: amd64
  Date: Wed Jun  9 11:43:21 2010
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.utf8
   SHELL=/bin/bash
  SourcePackage: gcc-defaults

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc-defaults/+bug/591819/+subscriptions




More information about the foundations-bugs mailing list