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

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


> Hmm, Tom had problems with modules too.  Do simpler programs (ie.
> programs that switch the video mode only once) work right with
> SVGAlib?

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 ! ;-)

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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