Bug 101448 - g++ exceptions broken in libjpeg error callbacks
g++ exceptions broken in libjpeg error callbacks
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: libjpeg (Show other bugs)
9
All Linux
medium Severity high
: ---
: ---
Assigned To: Matthias Clasen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-01 03:12 EDT by Vladimir Vukicevic
Modified: 2007-04-18 12:56 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-02 14:08:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vladimir Vukicevic 2003-08-01 03:12:31 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030530

Description of problem:
This seems to be related to this gcc bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9265

However, I'm specifically running into it with libjpeg, so I'm filing this bug
against libjpeg -- please refile against whatever is more appropriate.  This bug
is probably not limited to libjpeg.

Package versions:
libjpeg-6b-26
gcc-3.2.2-5
gcc-c++-3.2.2-5
libstdc++-3.2.2-5
glibc-2.3.2-27.9

The attached program aborts unexpectedly when the throw is executed in the error
handler.  If the libjpeg rpm is rebuilt with CC="g++ -x c++", so that it obtains
the GNU_EH_FRAME info (as reported by readelf -l libjpeg.so.62.0.0), the program
correctly prints "Exception caught!".

Sample program:

Compile with "gcc -o jpegbug jpegbug.c -ljpeg -lstdc++"

----- jpegbug.cpp -----

#include <stdio.h>
#include <jpeglib.h>
                                                                                
static void
my_error_exit (j_common_ptr cinfo)
{
    throw cinfo;
}
                                                                                
int
main (int argc, char **argv)
{
    struct jpeg_decompress_struct cinfo;
    struct jpeg_error_mgr jerr;
    FILE *infile;
                                                                                
    infile = fopen ("/dev/null", "rb");
                                                                                
    cinfo.err = jpeg_std_error(&jerr);
    jerr.error_exit = my_error_exit;
                                                                                
    try {
        jpeg_create_decompress(&cinfo);
        jpeg_stdio_src(&cinfo, infile);
        jpeg_read_header(&cinfo, TRUE);
    } catch (j_common_ptr cptr) {
        fprintf (stderr, "Exception caught!\n");
    }
}

------ end jpegbug -------

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

How reproducible:
Always
Comment 1 Vladimir Vukicevic 2003-08-22 04:44:52 EDT
ping?  or should I refile against g++?
Comment 2 Mike Shaver 2003-09-12 01:07:44 EDT
Hello?
Comment 3 christian koestlin 2005-10-09 11:05:48 EDT
hello is there still anyody around?
i have the same problem on a different platform. any resolutions?
(i get terminate called after throwing an instance of 'Exception', wheras Exception is the c+
+exceptionclass i throw in the libjpeg error handler)
Comment 4 Bill Nottingham 2006-08-05 00:52:38 EDT
Red Hat apologizes that these issues have not been resolved yet. We do want to
make sure that no important bugs slip through the cracks.

Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
They are maintained by the Fedora Legacy project (http://www.fedoralegacy.org/)
for security updates only. If this is a security issue, please reassign to the
'Fedora Legacy' product in bugzilla. Please note that Legacy security update
support for these products will stop on December 31st, 2006.

If this is not a security issue, please check if this issue is still present
in a current Fedora Core release. If so, please change the product and version
to match, and check the box indicating that the requested information has been
provided.

If you are currently still running Red Hat Linux 7.3 or 9, please note that
Fedora Legacy security update support for these products will stop on December
31st, 2006. You are strongly advised to upgrade to a current Fedora Core release
or Red Hat Enterprise Linux or comparable. Some information on which option may
be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Any bug still open against Red Hat Linux 7.3 or 9 at the end of 2006 will be
closed 'CANTFIX'. Again, if this bug still exists in a current release, or is a
security issue, please change the product as necessary. We thank you for your
help, and apologize again that we haven't handled these issues to this point.
Comment 6 Bill Nottingham 2007-01-02 14:08:03 EST
Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
f you are currently still running Red Hat Linux 7.3 or 9, you are strongly
advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux
or comparable. Some information on which option may be right for you is
available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.

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