Bug 28691 - Fix segfaults in xfs
Summary: Fix segfaults in xfs
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xfs (show other bugs)
Version: git
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-23 06:22 UTC by Olivier Fourdan
Modified: 2010-06-27 09:04 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Proposed patch (3.04 KB, patch)
2010-06-23 06:22 UTC, Olivier Fourdan
no flags Details | Splinter Review
Proposed patch (2.82 KB, patch)
2010-06-23 06:27 UTC, Olivier Fourdan
no flags Details | Splinter Review

Description Olivier Fourdan 2010-06-23 06:22:46 UTC
Created attachment 36437 [details] [review]
Proposed patch

The attached patch is to address possible remaining segfaults which can occur randomly in xfs, mostly a follow up on bug 22084

1. Make sure ListenTransCount is reset to 0 when ListenTransConns is freed to avoid a segfault in CloseSockets() when a “drone server” terminates.

2. ffs() is still used in various places on fd_mask whereas the fd_mask can be greater than an int.

3. replace (i << 5) with (i * (sizeof(fd_mask) * 8) to be more 64bit safe
Comment 1 Olivier Fourdan 2010-06-23 06:27:09 UTC
Created attachment 36438 [details] [review]
Proposed patch

Oops, sorry, the fix for point #1 was already applied in git commit a1583d53
Comment 2 James Cloos 2010-06-27 09:04:10 UTC
[Odd.  My attempt to update this via email must’ve fallen off into the æther.]

Fix pushed as commit 31917b20fe3d83ca51c460fdd66a7d61f2670db3.


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.