public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6787: seg fault when loading dynamic library that contains dynamic_cast
@ 2003-02-23 20:37 neroden
  0 siblings, 0 replies; 3+ messages in thread
From: neroden @ 2003-02-23 20:37 UTC (permalink / raw)
  To: aznagar, gcc-bugs, gcc-prs, nobody

Synopsis: seg fault when loading dynamic library that contains dynamic_cast

State-Changed-From-To: feedback->closed
State-Changed-By: neroden
State-Changed-When: Sun Feb 23 20:37:53 2003
State-Changed-Why:
    No feedback 3 months

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


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

* Re: c++/6787: seg fault when loading dynamic library that contains dynamic_cast
@ 2002-09-15  4:34 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-09-15  4:34 UTC (permalink / raw)
  To: aznagar, gcc-bugs, gcc-prs, nobody

Synopsis: seg fault when loading dynamic library that contains dynamic_cast

State-Changed-From-To: open->feedback
State-Changed-By: nathan
State-Changed-When: Sun Sep 15 04:34:18 2002
State-Changed-Why:
    cannot reproduce works for me on both 2.96RH and 3.3 cvs
    Linux uha.cs.bris.ac.uk 2.4.18-10 #1 Wed Aug 7 11:39:21 EDT 2002 i686 unknown
    
    glibc 2.2.5

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


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

* c++/6787: seg fault when loading dynamic library that contains dynamic_cast
@ 2002-05-23 12:26 aznagar
  0 siblings, 0 replies; 3+ messages in thread
From: aznagar @ 2002-05-23 12:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6787
>Category:       c++
>Synopsis:       seg fault when loading dynamic library that contains dynamic_cast
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 23 12:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dirk Walther
>Release:        3.1 and 2.96
>Organization:
>Environment:
RedHat linux 7.1 on a i686
>Description:
A dynamic library loader that has been compiled with g++-2.96 crashes with a segmentation fault when loading a dynamic library that has been compiled with g++-3.1 and that contains dynamic_cast.

The problem does not occur when the library loader is compiled using g++-3.1 - in this case it loads and executes libraries compiled with g++-2.96 or g++-3.1 just fine. Also, the problem does not occur when both library loader and library are compiled with g++-2.96.

I have attached the code for simple examples for the library loader, the library, and a log of a debug attempt.

In real life, the library loader is Matlab (compiled with g++-2.95.2) which I cannot recompile. The library is a MEX function that needs to use g++-3.x
>How-To-Repeat:
Use the code and the compiler flags as mentioned in the attached file.
>Fix:
The library loader should be recompiled using g++-3.x. Unfortunately, this is not possible for me with Matlab.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug_report"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug_report"

LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0KQSBsb2cgb2YgYSBjb21waWxlIGFuZCBkZWJ1ZzoKLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLQolIGcrKy0yLjk2IC1vIGR5bmxkIGR5bmxkLmMgLWxkbAolIGcrKy0zLjEg
LXNoYXJlZCBteWh3LmMgLW8gbXlody5zbwolIGdkYiAuL2R5bmxkCkdOVSBnZGIgNS4wcmgtNSBS
ZWQgSGF0IExpbnV4IDcuMQpDb3B5cmlnaHQgMjAwMSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24s
IEluYy4KR0RCIGlzIGZyZWUgc29mdHdhcmUsIGNvdmVyZWQgYnkgdGhlIEdOVSBHZW5lcmFsIFB1
YmxpYyBMaWNlbnNlLCBhbmQgeW91IGFyZQp3ZWxjb21lIHRvIGNoYW5nZSBpdCBhbmQvb3IgZGl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iAgc3RkOjpjb3V0IDw8IGItPmdldDIoKSA8PCAiXG4iOwogIHJldHVybjsKfQo=


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

end of thread, other threads:[~2003-02-23 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-23 20:37 c++/6787: seg fault when loading dynamic library that contains dynamic_cast neroden
  -- strict thread matches above, loose matches on Subject: below --
2002-09-15  4:34 nathan
2002-05-23 12:26 aznagar

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).