Bug 8092

Summary: Implementation of the function glXChooseFBConfig in the libGL.so does not match OpenGL documentation
Product: [Build System, Metadata & Runtime] BSPs Reporter: Ivan N <i.nikolaenko>
Component: bsps-meta-fsl-armAssignee: Otavio Salvador <otavio>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: neena.busireddy, otavio, richard.purdie, tom.hochstein
Version: 1.8   
Target Milestone: 2.0.4   
Hardware: Other   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Good example. For SegFault replace an attributeList with NULL in glxChooseFBConfig none

Description Ivan N 2015-08-03 15:03:26 UTC
Created attachment 2623 [details]
Good example. For SegFault replace an attributeList with NULL in glxChooseFBConfig

Hello all!
I am using Freescale i.MX6Q processor with latest Fido BSP. I have a problem with application, that uses glXChooseFBConfig funcltion. Application get a Segmentation Fault when call glXChooseFBConfig with 3rd NULL argument. Passing empty list at third argument DO NOT raise a SegFault.

From the OpenGL documentation:

glXChooseFBConfig returns GLX frame buffer configurations that match the attributes specified in attrib_list, or NULL if no matches are found. If attrib_list is NULL, then glXChooseFBConfig returns an array of GLX frame buffer configurations that are available on the specified screen.

Small code example for checking attached

Stacktrace:
Program received signal SIGSEGV, Segmentation fault.
0x76f99ae8 in __glXInitializeVisualConfigFromTags (config=0x7efffa70,
config[at]entry=0x7efffa68, count=count[at]entry=512, bp=0x0,
tagged_only=tagged_only[at]entry=1,
fbconfig_style_tags=fbconfig_style_tags[at]entry=1) at glxext.c:684
684 glxext.c: No such file or directory.
(gdb) where
#0 0x76f99ae8 in __glXInitializeVisualConfigFromTags (config=0x7efffa70,
config[at]entry=0x7efffa68, count=count[at]entry=512, bp=0x0,
tagged_only=tagged_only[at]entry=1,
fbconfig_style_tags=fbconfig_style_tags[at]entry=1) at glxext.c:684
#1 0x76f8e458 in ChooseFBConfig (fbconfig_style_tags=1 '\001',
attribList=<optimized out>, num_configs=24, configs=0x27860)
at glxcmds.c:1869
#2 glXChooseFBConfig (dpy=<optimized out>, screen=<optimized out>,
attribList=<optimized out>, nitems=0x7efffb6c) at glxcmds.c:1915
#3 0x000086a0 in main (argc=1, argv=0x7efffcd4) at test-2.c:15

Thread at OpenGL forum: 
https://www.opengl.org/discussion_boards/showthread.php/194751-i-MX6-glXChooseFBConfig-Segmentation-Fault-%28Segfault%29?p=1275976#post1275976

Reproduced by another person:
https://community.freescale.com/thread/330285

Reproducibility 100% of cases.
Comment 1 Otavio Salvador 2015-10-21 16:08:15 UTC
Neena, can you check this please?
Comment 2 Otavio Salvador 2016-04-22 19:12:44 UTC
Neena, could you share an update on this issue?
Comment 3 Richard Purdie 2017-06-15 15:06:31 UTC
No action on this bug and the release is no longer supported by the project.