Re: dlopen(), atexit() crash on FreeBSD (testcase included)



Markus Hoenicka wrote:
Alexander Kabaev writes:
> As designed. atexit should not be used by shared objects that do not
> expect themselves to live until actual exit() happens. ELF provides
> proper _init/_fini sections to support shared object
> initialization/destruction.
>

That is, the only real solution to this problem is to convince the
Firebird folks to remove their atexit() calls from the client
libraries? I'll try, but I'm not very confident this is going to
work. Also, I'm wondering how other OSes handle this. I don't see this
code crash on Linux, contrary to its design as you say.

Thanks anyway to you, and to Jason Evans, for your replies.

Not sure but I'd guess that each library calls its at_exit entrypoints
as part of its unload handling.


regards,
Markus


_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: dlopen(), atexit() crash on FreeBSD (testcase included)
    ... > expect themselves to live until actual exit() happens. ... Firebird folks to remove their atexit() calls from the client ... contrary to its design as you say. ...
    (freebsd-hackers)
  • Re: dlopen(), atexit() crash on FreeBSD (testcase included)
    ... atexit should not be used by shared objects that do not ... Firebird folks to remove their atexit() calls from the client ... contrary to its design as you say. ... routines in the mapped region of a shared object during dlcloseto invoke ...
    (freebsd-hackers)
  • Re: dlopen(), atexit() crash on FreeBSD (testcase included)
    ... Firebird folks to remove their atexit() calls from the client ... contrary to its design as you say. ... as part of its unload handling. ... shared objects are being unloaded or to add extra references to ...
    (freebsd-hackers)
  • Re: dlopen(), atexit() crash on FreeBSD (testcase included)
    ... Firebird folks to remove their atexit() calls from the client ... contrary to its design as you say. ... as part of its unload handling. ... shared objects are being unloaded or to add extra references to ...
    (freebsd-hackers)
  • Re: Electric Lock choice
    ... > what Codes they follow at any given time. ... > designed to exit you onto a Tarmac, ... The design, (Older ... >> around an airport... ...
    (alt.security.alarms)