Re: [AD] [LINUX] VGA/ModeX drivers

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I just skimmed through the sources of SVGAlib 1.4.3 and guess what ?
SVGAlib
> is dumb enough to register its __vga_exit() function with atexit(). Does
> that not remind you of anything ? ;-)
>
> So, if allegro_exit() is called before __vga_exit(), the SVGAlib module is
> unmapped first and then the libc tries to reach __vga_exit()'s address,
> hence of course the SIGSEGV.
>
> I removed allegro_exit() from demo.c and the SIGSEGV vanished. Magic ! ;-)

So, IOW, if you use allegro_exit() and the SVGAlib mode = crash...
nice...
that is why i never liked atexit in libraries =)



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/