Bug 66689 - OpenCL crashes when compiled with -fomit-frame-pointer
OpenCL crashes when compiled with -fomit-frame-pointer
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-06-13 13:56 EDT by Jack Lloyd
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-02 16:59:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jack Lloyd 2002-06-13 13:56:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417

Description of problem:
OpenCL 0.8.3 (not shipped with RH; see http://opencl.sourceforge.net) will crash
if compiled with GCC 2.96 as shipped with either RedHat 7.2 or 7.3. It does work
with the 2.96 installed in Mandrake 8.0, which implies something probably broke
between whenever Mandrake forked off you guys (I'm guessing around 7.1) and 7.2.
All applications using OpenCL will also crash with SIGSEGV or a bad exception throw.

It will only crash if compiled with -fomit-frame-pointer (which is the default).
Removing this flag and recompiling results in a good build.

I have observed this on 7.3, and users have seen it on 7.2 as well.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Download/unpack OpenCL.
2. Compile and run the validation tests with:
     ./configure.pl gcc-linux-i686
     make check

Actual Results:  After the build, the check application will crash either with a
SIGSEGV or (what looks like) a bad exception if you run either the validation
suite or the benchmarks.

Expected Results:  It should run through, as it does when compiled without

Additional info:

I have not seen this with gcc 3.0.4 or gcc 3.1

This also did not happen with OpenCL 0.8.2. Sadly, the changes between 0.8.2 and
0.8.3 are substantial, so that may not be particularly helpful. Of course,
-fomit-frame-pointer implies that you can't debug very well, so this is going to
be a real pain to track down, I suspect.

This program (sent to me by a user) is a simpler example than the check program.
When linked against a libopencl that was compiled with -fomit-frame-pointer, it
won't work (crashes):

#include <opencl/opencl.h>
#include <opencl/randpool.h>

int main() {
  try {
     OpenCL::LibraryInitializer opencl_init;
     OpenCL::Randpool rndPool;
  } catch(OpenCL::Exception& e) {
     std::cerr << "Caught exception from OpenCL" << std::endl;
  return 0;
Comment 1 Richard Henderson 2004-10-02 16:59:51 EDT
If it's known to work with 3.0.4 and 3.1, it likely works with 
current releases.

Note You need to log in before you can comment on or make changes to this bug.