[Piglit] [PATCH] piglit: fix crashes when using original GLUT

Chad Versace chad.versace at linux.intel.com
Mon Oct 15 11:08:51 PDT 2012


On 10/15/2012 10:30 AM, Brian Paul wrote:
> The glutInit() function in the original GLUT expects argv[0] to be the
> program name (as from main()), not a NULL pointer.  A strrchr() call
> crashes on NULL.
> 
> For now, set argv[0]="piglit".  Previously, glutInit would get the
> program path/name and it would appear in the window title.
> 
> This seems to be a regression since the waffle changes.
> ---

Looks good to me.
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

Brian, I'm curious on what OS and version of GLUT you found this problem. On
Fedora 17 with freeglut-2.8.0 the segfault doesn't happen.


More information about the Piglit mailing list