Re: [AD] [LINUX] VGA/ModeX drivers |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Allegro Conductors" <conductors@xxxxxxxxxx>
- Subject: Re: [AD] [LINUX] VGA/ModeX drivers
- From: xaviergonz@xxxxxxxxxx
- Date: Mon, 26 Nov 2001 02:50:12 +0100
- Wrom: EGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCD
> 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 =)