public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-04 18:56 swansma
  0 siblings, 0 replies; 9+ messages in thread
From: swansma @ 2002-01-04 18:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5282
>Category:       c++
>Synopsis:       .so exception handler works in 3.0.2 not 3.0.3
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 04 18:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     swansma@yahoo.com
>Release:        gcc version 3.0.3
>Organization:
>Environment:
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.0.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share/gcc-3.0.3 --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-cstdio=stdio --enable-clocale=generic --enable-languages=c,c++,f77,objc,java --program-suffix=-3.0.3 --enable-objc-gc --host=i586-mandrake-linux-gnu
Thread model: posix
>Description:
Simple test program works in 3.0.2, not in 3.0.3.
A simple try { throw Object() }catch{Object e} fails.

code and make targets in How-To-Repeat
tuxmodule.h (attached) is required to build (and is from the 
redhat (Ingo Molnar) Tux HTTP server package.
>How-To-Repeat:
******* Make targets ********
bugLoad: bugLoad.c BugLib.tux.so
    ${GCC} -rdynamic -ldl bugLoad.c -o bugLoad

BugLib.o: BugLib.cpp
    ${CC} ${RELEASE_CPPFLAGS} -c BugLib.cpp

BugLib.tux.so: BugLib.o
    ${CC} ${LINK} -O2 -Wall -D_REENTRANT -shared -o $@ BugLib.o -lstdc++ -lgcc_s
    chmod a-x $@

****** bugLoad.c (./bugLoad shows bug) ********
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/wait.h>
#include <linux/unistd.h>
#include <unistd.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <regex.h>
#include <fcntl.h>
#include <time.h>
#include <sys/mman.h>
#include <dlfcn.h>
#include <popt.h>
#include <sys/socket.h>
#include <ctype.h>
//#include <glib.h>


int main(int argc, char** argv) {
        void* handle;
        void (*mod_init) (void);
        char libname[] = "./BugLib.tux.so";

        handle = dlopen (libname, RTLD_LAZY);
        printf ("handle: %p\n", handle);
        if (!handle) {
                printf("%s: dlopen() handle missing", dlerror());
        }
        mod_init = dlsym(handle, "TUXAPI_init");
        if (!mod_init) {
                printf("%s: TUXAPI_init() function missing", strerror(errno));
        }

        printf ("TUXAPI_init: %p\n", mod_init);
        if(mod_init)
                mod_init();

}

******* BugLib.cpp (shows exception bug, requires Tux) ***
extern "C" {
        #include "tuxmodule.h"
        void TUXAPI_init();
        int TUXAPI_handle_events (user_req_t *req);
}

#include "syslog.h"
#include "TestException.h"

int TUXAPI_handle_events (user_req_t *req) {
        return TUX_RETURN_USERSPACE_REQUEST;
}
//TUXAPI_handle_events

// 1. open syslog
// 2.
void TUXAPI_init() {

        openlog("BugLib", LOG_PID | LOG_CONS | LOG_NDELAY, LOG_DAEMON);

        syslog(LOG_INFO, "TUXAPI_init()");

        try {
                throw TestException("test123");
                return;
        } catch(TestException e) {
                // This never happens
                syslog(LOG_INFO, "Success");
        }

}

******* TestException.h ********
#ifndef _EXCEPTION_H
#define _EXCEPTION_H

#include <string.h>

class TestException {
protected:
        char msg[1024];

public:
        TestException(const char *errorMessage) {
                strcpy(msg, errorMessage);
        }

};

#endif
>Fix:
none - downgrade to 3.0.2 if you can find rpms (likely not).
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-chdr; name="tuxmodule.h"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="tuxmodule.h"

I2lmbmRlZiBfVFVYX01PRFVMRV9ICiNkZWZpbmUgX1RVWF9NT0RVTEVfSAoKLyoKICogVF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KCQk6Ij1yIiAob2xkYml0KSwi
PW0iIChBRERSKQoJCToiSXIiIChucikpOwoJcmV0dXJuIG9sZGJpdDsKfQoKZXh0ZXJuIF9faW5s
aW5lX18gdm9pZCBUVVhBUElfZG93biAoaW50ICpzZW0pCnsKCXdoaWxlICh0ZXN0X2FuZF9zZXRf
Yml0KDAsIHNlbSkpCgkJYmFycmllcigpOwp9CgpleHRlcm4gX19pbmxpbmVfXyB2b2lkIFRVWEFQ
SV91cCAoaW50ICpzZW0pCnsKCSooKHZvbGF0aWxlIGludCAqKXNlbSkgPSAwOwp9CgojZGVmaW5l
IFRVWF9ERUJVRyAwCgojaWYgVFVYX0RFQlVHCiMgZGVmaW5lIERwcmludGsoeC4uLikgZG8geyBw
cmludGYoeCk7IGZmbHVzaChzdGRvdXQpOyB9IHdoaWxlICgwKQojZWxzZQojIGRlZmluZSBEcHJp
bnRrKHguLi4pIGRvIHsgfSB3aGlsZSAoMCkKI2VuZGlmCgojZGVmaW5lIEhUVFBfVFJBQ0UocmVx
LGluZm8pIERwcmludGsoIkhUVFAgdHJhY2UgYXQgJXM6JWQsIHJlcXVlc3QgJXAsIGluZm8gJWQs
IGV2ZW50ICVkIChtZXRoOiVkLCBxdWVyeTolcywgY29va2llczolcykuXG4iLCBfX0ZJTEVfXywg
X19MSU5FX18sIChyZXEpLT5pZCwgaW5mbywgKHJlcSktPmV2ZW50LCAocmVxKS0+aHR0cF9tZXRo
b2QsIChyZXEpLT5xdWVyeSwgKHJlcSktPmNvb2tpZXNfbGVuID8gKHJlcSktPmNvb2tpZXMgOiAi
PG5vIGNvb2tpZXM+IikKCiNlbmRpZgo=


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-05 16:27 rodrigc
  0 siblings, 0 replies; 9+ messages in thread
From: rodrigc @ 2002-01-05 16:27 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, swansma

Synopsis: .so exception handler works in 3.0.2 not 3.0.3

State-Changed-From-To: analyzed->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Jan  5 16:27:12 2002
State-Changed-Why:
    I just tried your testcase with:
    gcc version 3.1 20020104 (experimental)
    and glibc 2.2.4.
    
    It worked, so I am going to close this PR.
    
    If you encounter this PR again with more stable versions
    of glibc 3 and gcc 3.1, then we can open a new PR.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5282


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-05 16:16 Mark Swanson
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Swanson @ 2002-01-05 16:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5282; it has been noted by GNATS.

From: Mark Swanson <swansma@yahoo.com>
To: Craig Rodrigues <rodrigc@mediaone.net>
Cc: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
Date: Sat, 5 Jan 2002 19:08:32 -0500

 On January 5, 2002 06:11 pm, Craig Rodrigues wrote:
 >
 > I don't know much about glibc 3 beta.  Sounds like you
 > are living on the edge and encountering problems.
 
 Yep.
 I had originally installed glibc 3 beta to install gcc3.1 to get around some 
 different 3.0.[2,3] exception bugs - which turned out to be binutils bugs. 
 After downgrading glibc to 2.2.4 and uninstalling 3.1 the example works for 
 me too (no abort).
 
 So the problem appears to be a glibc3 or gcc3.1 issue. I'm sure it will get 
 worked out by the time they come out of beta.
 
 Thanks for all the help.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-05 15:16 Craig Rodrigues
  0 siblings, 0 replies; 9+ messages in thread
From: Craig Rodrigues @ 2002-01-05 15:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5282; it has been noted by GNATS.

From: Craig Rodrigues <rodrigc@mediaone.net>
To: Mark Swanson <swansma@yahoo.com>
Cc: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
Date: Sat, 5 Jan 2002 18:11:52 -0500

 On Sat, Jan 05, 2002 at 05:48:25PM -0500, Mark Swanson wrote:
 > Strange. The -rdynamic works for me. It's also used by other RedHat 
 > applications like Tux...
 > 
 > >     I then ran the testcase and everything worked.
 > 
 > You mean you saw the "Aborted" result?
 
 No.  I get:
 
 ./bugLoad
 handle: 0x8049948
 TUXAPI_init: 0x40018b10
 
 > I get 'Aborted' every time with gcc-3.1 and gcc-3.0.3. Note this means I'm 
 > using glibc-3.x beta. It is not possible to link against a previous version 
 ^^^^^^^^^^^^^^^^^^^^^^^
 
 I'm using the stock glibc-2.2.2-10 that comes with Redhat 7.1.
 
 I don't know much about glibc 3 beta.  Sounds like you
 are living on the edge and encountering problems.
 -- 
 Craig Rodrigues        
 http://www.gis.net/~craigr    
 rodrigc@mediaone.net          


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-05 15:06 Mark Swanson
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Swanson @ 2002-01-05 15:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5282; it has been noted by GNATS.

From: Mark Swanson <swansma@yahoo.com>
To: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org, swansma@yahoo.com, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
Date: Sat, 5 Jan 2002 17:48:25 -0500

 On January 5, 2002 05:14 pm, you wrote:
 > Synopsis: .so exception handler works in 3.0.2 not 3.0.3
 >
 > State-Changed-From-To: feedback->analyzed
 > State-Changed-By: rodrigc
 > State-Changed-When: Sat Jan  5 14:14:00 2002
 > State-Changed-Why:
 >     Your makefile did not work for me, so I modified it, and
 >     put it in the package which you supplied, and then
 >     attached it to this PR in GNATS.  Things like the -rdynamic
 >     flag did not work on my system (Redhat Linux 7.1).
 
 Strange. The -rdynamic works for me. It's also used by other RedHat 
 applications like Tux...
 
 >     I then ran the testcase and everything worked.
 
 You mean you saw the "Aborted" result?
 I get 'Aborted' every time with gcc-3.1 and gcc-3.0.3. Note this means I'm 
 using glibc-3.x beta. It is not possible to link against a previous version 
 of gcc. I will erase gcc-3.1 and glibc3 and try again.
 
 >     Configured with: ./configure --prefix=/u0/test/gcc --enable-checking
 > --enable-languages=c,c++ --enable-shared --enable-threads Thread model:
 > posix
 >     gcc version 3.0.3
 >
 >     #
 >     # $Id: Makefile,v 1.2 2002/01/05 14:30:41 mswanson Exp $
 >     #
 >     CXX = g++
 >     CC = gcc
 >     GCC = gcc
 >     CPPFLAGS = -g -fPIC -Wall -DDEBUG -D_GNU_SOURCE
 >     RELEASE_CPPFLAGS = -O2 -Wall -fPIC -D_REENTRANT -DNDEBUG -LANG:std
 > -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
 >
 >     all:: bugLoad
 >
 >     pre:: bugLoadPre
 >
 >     release::
 >
 >     bugLoad: bugLoad.c BugLib.tux.so
 >             ${GCC} bugLoad.c -o bugLoad -ldl
 >
 >     BugLib.o: BugLib.cpp
 >             ${CXX} ${RELEASE_CPPFLAGS} -c BugLib.cpp
 >
 >     BugLib.tux.so: BugLib.o
 >             ${CC} ${LINK} -O2 -Wall -D_REENTRANT -shared -o $@ BugLib.o
 > -lstdc++ -lgcc_s chmod a-x $@
 >
 >     bugLoadPre: bugLoad.c BugLib.tux.so
 >             ${GCC} -v -save-temps  -ldl bugLoad.c -o bugLoadPre
 >
 >     BugLibPre.o: BugLib.cpp
 >             ${CC} -v -save-temps ${RELEASE_CPPFLAGS} -c BugLib.cpp -o $@
 >
 >     BugLibPre.tux.so: BugLibPre.o
 >             ${CC} ${LINK} -O2 -Wall -D_REENTRANT -shared -o $@ BugLibPre.o
 > -lstdc++ -lgcc_s chmod a-x $@
 >
 >     clean::
 >             rm -f *.so *.o *.a bugLoad bugLoadPre
 >
 >
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&
 >pr=5282


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-05 14:14 rodrigc
  0 siblings, 0 replies; 9+ messages in thread
From: rodrigc @ 2002-01-05 14:14 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, swansma

Synopsis: .so exception handler works in 3.0.2 not 3.0.3

State-Changed-From-To: feedback->analyzed
State-Changed-By: rodrigc
State-Changed-When: Sat Jan  5 14:14:00 2002
State-Changed-Why:
    Your makefile did not work for me, so I modified it, and
    put it in the package which you supplied, and then
    attached it to this PR in GNATS.  Things like the -rdynamic
    flag did not work on my system (Redhat Linux 7.1).
    
    I then ran the testcase and everything worked.
    Configured with: ./configure --prefix=/u0/test/gcc --enable-checking --enable-languages=c,c++ --enable-shared --enable-threads
    Thread model: posix
    gcc version 3.0.3
    
    #
    # $Id: Makefile,v 1.2 2002/01/05 14:30:41 mswanson Exp $
    #
    CXX = g++
    CC = gcc
    GCC = gcc
    CPPFLAGS = -g -fPIC -Wall -DDEBUG -D_GNU_SOURCE
    RELEASE_CPPFLAGS = -O2 -Wall -fPIC -D_REENTRANT -DNDEBUG -LANG:std -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
     
    all:: bugLoad
     
    pre:: bugLoadPre
     
    release::
     
    bugLoad: bugLoad.c BugLib.tux.so
            ${GCC} bugLoad.c -o bugLoad -ldl
     
    BugLib.o: BugLib.cpp
            ${CXX} ${RELEASE_CPPFLAGS} -c BugLib.cpp
     
    BugLib.tux.so: BugLib.o
            ${CC} ${LINK} -O2 -Wall -D_REENTRANT -shared -o $@ BugLib.o -lstdc++ -lgcc_s
            chmod a-x $@
     
    bugLoadPre: bugLoad.c BugLib.tux.so
            ${GCC} -v -save-temps  -ldl bugLoad.c -o bugLoadPre
     
    BugLibPre.o: BugLib.cpp
            ${CC} -v -save-temps ${RELEASE_CPPFLAGS} -c BugLib.cpp -o $@
     
    BugLibPre.tux.so: BugLibPre.o
            ${CC} ${LINK} -O2 -Wall -D_REENTRANT -shared -o $@ BugLibPre.o -lstdc++ -lgcc_s
            chmod a-x $@
     
    clean::
            rm -f *.so *.o *.a bugLoad bugLoadPre
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5282


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-05  6:36 Mark Swanson
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Swanson @ 2002-01-05  6:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5282; it has been noted by GNATS.

From: Mark Swanson <swansma@yahoo.com>
To: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
Date: Sat, 5 Jan 2002 09:19:19 -0500

 On January 4, 2002 11:53 pm, rodrigc@gcc.gnu.org wrote:
 > Synopsis: .so exception handler works in 3.0.2 not 3.0.3
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: rodrigc
 > State-Changed-When: Fri Jan  4 20:53:38 2002
 > State-Changed-Why:
 >     You did not provide enough files to compile your testcase:
 >     tuxmodule.h:31:17: tux.h: No such file or directory
 >
 >     Instead of feeding us files one by one, read the
 >     bug submission instructions at:
 >     http://gcc.gnu.org/bugs.html and give us a single preprocessed
 >     source file.
 >
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&
 >pr=5282
 
 The update I sent (BugLib.cpp) does not require tuxmodule.h at all. My hope 
 was that would be enough to meet the requirements. It's three tiny files 
 instead of one, but they don't require any third party package...
 
 Because of the nature of the test case requiring the creation of a shared 
 library, and a test program to load it, that would require two preprocessed 
 files. Would that be preferrable than my three tiny source files?
 
 Lemme know.
 Thanks.
 
 
 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-04 20:53 rodrigc
  0 siblings, 0 replies; 9+ messages in thread
From: rodrigc @ 2002-01-04 20:53 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, swansma

Synopsis: .so exception handler works in 3.0.2 not 3.0.3

State-Changed-From-To: open->feedback
State-Changed-By: rodrigc
State-Changed-When: Fri Jan  4 20:53:38 2002
State-Changed-Why:
    You did not provide enough files to compile your testcase:
    tuxmodule.h:31:17: tux.h: No such file or directory 
    
    Instead of feeding us files one by one, read the
    bug submission instructions at:
    http://gcc.gnu.org/bugs.html and give us a single preprocessed
    source file.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5282


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
@ 2002-01-04 20:26 Craig Rodrigues
  0 siblings, 0 replies; 9+ messages in thread
From: Craig Rodrigues @ 2002-01-04 20:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5282; it has been noted by GNATS.

From: Craig Rodrigues <rodrigc@mediaone.net>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   nobody@gcc.gnu.org, swansma@yahoo.com
Cc:  
Subject: Re: c++/5282: .so exception handler works in 3.0.2 not 3.0.3
Date: Fri, 04 Jan 2002 23:23:28 -0500

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5282
 
 Added by swansma@yahoo.com in PR 5283:
 
 =========================================================================
 
 
  Hello,
  Not sure how to add info to a bug report. Hopefully this email is the
 correct
  way to do it.
 
  I just wanted to note that:
  1. 5282 contains a testcase
  2. 5282 is completely different than 5238
  3. The 5282 testcase works on 3.0.2. It does NOT work on 3.0.3 or 3.1
 beta
  with any version of binutils.
  4. The include file tuxmodule.h is not needed to make the testcase
 compile.
  Here's the replacement:
 
  extern "C" {
      void TUXAPI_init();
      int TUXAPI_handle_events (void* req);
  }
 
  #include "syslog.h"
  #include "TestException.h"
 
  int TUXAPI_handle_events (void* req) {
      return 1;
  }
 
  void TUXAPI_init() {
 
      openlog("BugLib", LOG_PID | LOG_CONS | LOG_NDELAY, LOG_DAEMON);
 
      syslog(LOG_INFO, "TUXAPI_init()");
 
      try {
          throw TestException("test123");
          return;
      } catch(TestException e) {
          // This never happens
          syslog(LOG_INFO, "Success");
      }
 
  }
 
 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-01-06  0:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-04 18:56 c++/5282: .so exception handler works in 3.0.2 not 3.0.3 swansma
2002-01-04 20:26 Craig Rodrigues
2002-01-04 20:53 rodrigc
2002-01-05  6:36 Mark Swanson
2002-01-05 14:14 rodrigc
2002-01-05 15:06 Mark Swanson
2002-01-05 15:16 Craig Rodrigues
2002-01-05 16:16 Mark Swanson
2002-01-05 16:27 rodrigc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).