<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8092</bug_id>
          
          <creation_ts>2015-08-03 15:03:26 +0000</creation_ts>
          <short_desc>Implementation of the function glXChooseFBConfig in the libGL.so does not match OpenGL documentation</short_desc>
          <delta_ts>2017-06-15 15:06:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-fsl-arm</component>
          <version>1.8</version>
          <rep_platform>Other</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.0.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan N">i.nikolaenko</reporter>
          <assigned_to name="Otavio Salvador">otavio</assigned_to>
          <cc>neena.busireddy</cc>
    
    <cc>otavio</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tom.hochstein</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>52788</commentid>
    <comment_count>0</comment_count>
      <attachid>2623</attachid>
    <who name="Ivan N">i.nikolaenko</who>
    <bug_when>2015-08-03 15:03:26 +0000</bug_when>
    <thetext>Created attachment 2623
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 &apos;\001&apos;,
attribList=&lt;optimized out&gt;, num_configs=24, configs=0x27860)
at glxcmds.c:1869
#2 glXChooseFBConfig (dpy=&lt;optimized out&gt;, screen=&lt;optimized out&gt;,
attribList=&lt;optimized out&gt;, 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55569</commentid>
    <comment_count>1</comment_count>
    <who name="Otavio Salvador">otavio</who>
    <bug_when>2015-10-21 16:08:15 +0000</bug_when>
    <thetext>Neena, can you check this please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61575</commentid>
    <comment_count>2</comment_count>
    <who name="Otavio Salvador">otavio</who>
    <bug_when>2016-04-22 19:12:44 +0000</bug_when>
    <thetext>Neena, could you share an update on this issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74218</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-06-15 15:06:31 +0000</bug_when>
    <thetext>No action on this bug and the release is no longer supported by the project.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2623</attachid>
            <date>2015-08-03 15:03:26 +0000</date>
            <delta_ts>2015-08-03 15:03:26 +0000</delta_ts>
            <desc>Good example. For SegFault replace an attributeList with NULL in glxChooseFBConfig</desc>
            <filename>working_code.c</filename>
            <type>text/x-csrc</type>
            <size>321</size>
            <attacher name="Ivan N">i.nikolaenko</attacher>
            
              <data encoding="base64">I2luY2x1ZGUgPEdML2dseC5oPgojaW5jbHVkZSA8R0wvZ2wuaD4KI2luY2x1ZGUgPHVuaXN0ZC5o
PgojaW5jbHVkZSA8c3RkaW8uaD4KIAoKaW50IG1haW4gKGludCBhcmdjLCBjaGFyICoqIGFyZ3Yp
CnsKCURpc3BsYXkgKmRweSA9IFhPcGVuRGlzcGxheSgwKTsKIAoJaW50IG5lbDsKIAoJc3RhdGlj
IGludCBhdHRyaWJ1dGVMaXN0W10gPSB7Tm9uZX07CgoJR0xYRkJDb25maWcgKmZiYyA9IGdsWENo
b29zZUZCQ29uZmlnKGRweSwgRGVmYXVsdFNjcmVlbihkcHkpLCBhdHRyaWJ1dGVMaXN0LCAmbmVs
KTsKCglwcmludGYoIk9LIVxuIik7CgoJcmV0dXJuIDA7Cn0K
</data>

          </attachment>
      

    </bug>

</bugzilla>