[C++-sig] Re: other/6602: GCC/Linux shared lib + EH bug example

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed May 8 20:23:02 CEST 2002


Martin v. Loewis wrote:
> Looking at your example gcc_dl_eh: Can you please try to not define
> the worker_error dtor inline? I.e. implement it in libcore.cpp
> instead; I'd be curious whether this changes anything.

It does not change the outcome. See attached.
Thanks,
        Ralf

% make
gcc -g -c master.c
gcc -o master master.o -ldl
g++ -g -c ext1.cpp
g++ -g -c libcore.cpp
g++ -shared -Wl,-E -o libcore.so libcore.o
g++ -shared -Wl,-E -o ext1.so ext1.o libcore.so
g++ -g -c ext2.cpp
g++ -shared -Wl,-E -o ext2.so ext2.o libcore.so
*********************************************************
LD_LIBRARY_PATH=.:/usr/local_cci/gcc-3.0.4/lib master G 1
dlopen flag: RTLD_GLOBAL
init_ext1
init_ext2
run1
  mycore::dispatcher
    ext1::worker
      now throwing worker_error()
    success catching worker_error
run2
  mycore::dispatcher
    ext2::worker
      now throwing worker_error()
    success catching worker_error

*********************************************************
LD_LIBRARY_PATH=.:/usr/local_cci/gcc-3.0.4/lib master G 2
dlopen flag: RTLD_GLOBAL
init_ext2
init_ext1
run1
  mycore::dispatcher
    ext1::worker
      now throwing worker_error()
    success catching worker_error
run2
  mycore::dispatcher
    ext2::worker
      now throwing worker_error()
    success catching worker_error

*********************************************************
LD_LIBRARY_PATH=.:/usr/local_cci/gcc-3.0.4/lib master L 1
dlopen flag: RTLD_LOCAL
init_ext1
init_ext2
run1
  mycore::dispatcher
    ext1::worker
      now throwing worker_error()
    success catching worker_error
run2
  mycore::dispatcher
    ext2::worker
      now throwing worker_error()
    #################################
    #                               #
    # FAILURE catching worker_error #
    #                               #
    #################################

*********************************************************
LD_LIBRARY_PATH=.:/usr/local_cci/gcc-3.0.4/lib master L 2
dlopen flag: RTLD_LOCAL
init_ext2
init_ext1
run1
  mycore::dispatcher
    ext1::worker
      now throwing worker_error()
    #################################
    #                               #
    # FAILURE catching worker_error #
    #                               #
    #################################
run2
  mycore::dispatcher
    ext2::worker
      now throwing worker_error()
    success catching worker_error


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com





More information about the Cplusplus-sig mailing list