[Mesa3d-dev] [Bug 23774] Using glutCreateWindow() seeds RNG with predictable value

2009-09-17 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=23774





--- Comment #7 from Geir Ove Myhr gom...@gmail.com  2009-09-17 12:40:22 PST 
---
(In reply to comment #6)
 Geir, could you test this patch?

Tested. With the patch, the test program gets new random numbers every new
second, so the patch resolves the bug. 

I see there is still a number of calls to srandom(0xbeefbeef) in
src/glx/x11/glxhash.c , but those are probably not invoked when calling
glxMakeCurrent().


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 23774] Using glutCreateWindow() seeds RNG with predictable value

2009-09-17 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=23774


Ian Romanick i...@freedesktop.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #8 from Ian Romanick i...@freedesktop.org  2009-09-17 17:19:28 
PST ---
(In reply to comment #7)
 (In reply to comment #6)
  Geir, could you test this patch?
 
 Tested. With the patch, the test program gets new random numbers every new
 second, so the patch resolves the bug. 
 
 I see there is still a number of calls to srandom(0xbeefbeef) in
 src/glx/x11/glxhash.c , but those are probably not invoked when calling
 glxMakeCurrent().
 

Correct.  The other srandom calls are in a testing main function that is
#ifdef'ed out.

I've pushed this patch to mesa_7_5_branch, and it will find its way to
mesa_7_6_branch and master soon.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 23774] Using glutCreateWindow() seeds RNG with predictable value

2009-09-16 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=23774





--- Comment #6 from Ian Romanick i...@freedesktop.org  2009-09-16 16:51:11 
PST ---
Created an attachment (id=29610)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=29610)
glx: Use initstate_r / random_r instead of corrupting global random number
state

The hash table code actually needs some random numbers.  Calling random may not
be safe, regardless of the srandom issue, in multithreaded applications.  Using
initstate_r and random_r should fix these issues.

Geir, could you test this patch?


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 23774] Using glutCreateWindow() seeds RNG with predictable value

2009-09-15 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=23774


Ian Romanick i...@freedesktop.org changed:

   What|Removed |Added

 AssignedTo|i...@freedesktop.org |mesa3d-
   ||d...@lists.sourceforge.net
  Component|Drivers/DRI/i965|GLX




--- Comment #4 from Ian Romanick i...@freedesktop.org  2009-09-15 11:09:54 
PST ---
It looks like this is caused by the use of srandom in src/glx/x11/glxhash.c. 
We can fix this by either not calling srandom or by providing our own random
number generator.  The GLX code always calls srandom with 0xDEADBEEF, which
seems almost useless.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] [Bug 23774] Using glutCreateWindow() seeds RNG with predictable value

2009-09-15 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=23774





--- Comment #5 from Brian Paul brian.e.p...@gmail.com  2009-09-15 11:43:26 
PST ---
Ugh!  That would explain some weirdness I saw a while back when debugging an
app that used random numbers.  Can we just get rid of the srandom() call and be
done?


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev