axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Whitlock (JIRA)" <>
Subject [jira] Created: (AXISCPP-549) Add RTLD_GLOBAL to dlopen
Date Mon, 14 Mar 2005 17:30:08 GMT
Add RTLD_GLOBAL to dlopen

         Key: AXISCPP-549
     Project: Axis-C++
        Type: Bug
    Reporter: Mark Whitlock
 Assigned to: Mark Whitlock 

Committing fix on behalf of Tim Bartley. He wrote....

Hi Mark, 

That wasn't the (only) problem. Eventually I tracked it down. It's because the shared libraries
are not loaded with the RTLD_GLOBAL flag. Because of this the type definition of the exception
thrown in the channel library is considered different to the type definition (of the same
class) in the transport library. This causes flushOutput to generate a call to the unhandled
exception handler because it's not considered a matching exception. The fix is to add RTLD_GLOBAL
to the flags passed to dlopen as defined in PlatformSpecificUnix.hpp. See
for details as to why this is necessary. 

Incidentally HTTPTransport::flushOutput is incorrectly declared. It has code that throws (well,
rethrows) AxisExceptions but it is declared to only throw HTTPTransportExceptions. (Re)Throwing
an AxisException should result in the C++ "unexpected()" being called which will abort the
process by default. That is, any code that does: 

class BaseE {}; 
class SubE : public BaseE {}; 

void f() throw(SubE) 
        throw BaseE(); 

int main() 
        try { 
        catch (SubE& e) { 
                cout << "Caught sub" << endl; 
        catch (BaseE&e ) { 
                cout << "Caught base" << endl; 

should, according to the C++ spec, abort. f should be declared throw(BaseE) and then it can
throw either BaseE's or SubE's and callers can catch either. 


IBM Tivoli Access Manager Development
Gold Coast Development Lab, Australia
+61-7-5552-4001 phone
+61-7-5571-0420 fax 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message