[MPlayer-users] a serious exit(3) related bug in mplayer

D Richard Felker III dalias at aerifal.cx
Sat Dec 7 06:21:01 CET 2002


On Fri, Dec 06, 2002 at 06:07:32PM -0500, Mikhail Teterin wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> It appears, there is a serious bug in how mplayer treats loadable
> libraries. If such a library calls atexit(3) to register _its own
> function_ to be called at exit time, mplayer will crash in exit() called
> from exit_player(), if the library was dlclose()d already.
> 
> Calling _exit(2) directly is one workaround, but it may leave things in
> bad shape...
> 
> The only solution seems to NOT unload any libraries (remove the calls to
> dlclose()). Unfortunately, there is no standard C API to access the list
> of functions registered with atexit() to know, if it is safe to unload a
> particular library...

How about instead redefining the atexit symbol to trap calls to
atexit? :)

Rich




More information about the MPlayer-users mailing list