Bug 1501 - libGL causes double free.
libGL causes double free.
Status: RESOLVED FIXED
Product: DRI
Classification: Unclassified
Component: libGL
XOrg git
All Linux (All)
: high normal
Assigned To: Default DRI bug account
:
: 1531 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-30 11:51 UTC by Egbert Eich
Modified: 2004-12-12 10:56 UTC (History)
1 user (show)

See Also:


Attachments
Trivial fix (618 bytes, patch)
2004-09-30 11:53 UTC, Egbert Eich
no flags Details | Splinter Review
[FIXED_X11R68x] Improved fix (2.04 KB, patch)
2004-10-05 00:42 UTC, Egbert Eich
roland.mainz: 6.8‑branch+
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Egbert Eich 2004-09-30 11:51:26 UTC
Under certain circumstances (when /dev/dri/card* is not readable for a user)
libGL may cause a double free. Some versions of glibc will catch this situation now.
The attached patch will fix this problem.
Comment 1 Egbert Eich 2004-09-30 11:53:04 UTC
Created attachment 985 [details] [review]
Trivial fix

Please apply to lib/GL/glx/glxext.c
Comment 2 ajax at nwnk dot net 2004-09-30 14:37:18 UTC
applied, thanks.
Comment 3 Egbert Eich 2004-10-05 00:42:18 UTC
Created attachment 1013 [details] [review]
[FIXED_X11R68x] Improved fix

The previous patch (attachment 985 [details] [review]) was not complete. If the drm device cannot
be 
opened other things may go wrong because some variables never get set.
This patch supersedes the previous one. It is more complete.
Comment 4 Egbert Eich 2004-10-05 00:46:25 UTC
Sorry to reopen this bug. 
Unfortunately my previous fix wasn't complete. Please reverse patch from
attachment #985 [details] [review] and apply 1013 instead. Thanks.
Comment 5 Matthias Hopf 2004-10-05 03:10:08 UTC
*** Bug 1531 has been marked as a duplicate of this bug. ***
Comment 6 ajax at nwnk dot net 2004-10-05 15:50:05 UTC
old one backed out, new one applied.
Comment 7 Roland Mainz 2004-12-08 05:48:27 UTC
Comment on attachment 1013 [details] [review]
[FIXED_X11R68x] Improved fix

Approved in the 2004-12-06 release-wranglers conference call.
Please do not commit it yourself, I'll do that later today...
Comment 8 Roland Mainz 2004-12-13 05:56:17 UTC
Comment on attachment 1013 [details] [review]
[FIXED_X11R68x] Improved fix

Patch checked-in into X11R6.8.x stable branch:

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.365.2.56; previous revision: 1.365.2.55
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c,v  <-- 
dri_util.c
new revision: 1.1.1.3.2.1; previous revision: 1.1.1.3
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/lib/GL/glx/glxext.c,v  <--  glxext.c
new revision: 1.5.4.1; previous revision: 1.5
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...