Bug 9815 - XF86DGAGetVideo() prevents other atexit callbacks from being called
Summary: XF86DGAGetVideo() prevents other atexit callbacks from being called
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/other (show other bugs)
Version: 7.1 (2006.05)
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks: xorg-7.5
  Show dependency treegraph
 
Reported: 2007-01-30 14:32 UTC by Brice Goglin
Modified: 2009-08-31 17:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to stop calling _exit() from the atexit() callback (1.23 KB, patch)
2007-01-30 14:34 UTC, Brice Goglin
no flags Details | Splinter Review

Description Brice Goglin 2007-01-30 14:32:44 UTC
This bug has been reported in the Debian BTS 6 years ago and is still in Xorg 7.1 (and will be in 7.2 from what I see in the source).

XF86DGAGetVideo() registers XF86cleanup() with atexit. XF86cleanup() uses _exit(3). It causes all atexit callbacks that were registered before XF86cleanup() to not be called. The code has been kind of the same since 1995. I would suggests not calling _exit() from XF86cleanup, and just returning instead. The signal handler needs to cleanup things before exiting, but calling exit(), which will call the atexit() callbacks. All this code is still kind of dirty, but this change seems to fix the bug.

Brice
Comment 1 Brice Goglin 2007-01-30 14:34:32 UTC
Created attachment 8545 [details] [review]
Patch to stop calling _exit() from the atexit() callback
Comment 2 Daniel Stone 2007-02-27 01:36:04 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 3 Adam Jackson 2008-03-24 13:43:29 UTC
This is utterly amazingly bonged.

I'm really not comfortable with fixing the client lib until the server can actually clean up from DGA client death sensibly.  Which is not to say we shouldn't fix this, just that the client fix on its own isn't okay.
Comment 4 Daniel Stone 2008-03-24 15:42:48 UTC
On Mon, Mar 24, 2008 at 01:43:30PM -0700, bugzilla-daemon@freedesktop.org wrote:
> This is utterly amazingly bonged.
> 
> I'm really not comfortable with fixing the client lib until the server can
> actually clean up from DGA client death sensibly.  Which is not to say we
> shouldn't fix this, just that the client fix on its own isn't okay.

Any reason in particular to fix DGA instead of burning DGA and fixing
other bits?
Comment 5 Adam Jackson 2008-06-17 12:37:20 UTC
Moving to 7.5, whatever.  DGA users lose anyway, maybe by then we'll have a replacement.
Comment 6 Daniel Stone 2009-08-31 17:59:16 UTC
dga is dead dead dead!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.