Bug 53618 - [Bisected i915]Piglit glx_GLX_ARB_create_context_NULL_attribute_list Aborted
[Bisected i915]Piglit glx_GLX_ARB_create_context_NULL_attribute_list Aborted
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915
git
All Linux (All)
: high major
Assigned To: Ian Romanick
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 02:57 UTC by lu hua
Modified: 2012-10-10 03:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
First part of fix (1.21 KB, patch)
2012-09-27 01:00 UTC, Ian Romanick
Details | Splinter Review
Second part of fix (1.81 KB, patch)
2012-09-27 01:01 UTC, Ian Romanick
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description lu hua 2012-08-17 02:57:41 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       Pineview
Libdrm:	(master)libdrm-2.4.38-3-g3163cfe4db925429760407e77140e2d595338bc2
Mesa:	(master)1597176f7090eea73f41b3114ae2a02a50ac7a12
Xserver:(master)xorg-server-1.12.99.904-7-gad5fe2d9614959b68bf71e23abf7e5abac9c2734
Xf86_video_intel:(master)2.20.3-45-g94871944a0e1351273d6029df7bf0300f31a8571
Libva:	(staging)f12f80371fb534e6bbf248586b3c17c298a31f4e
Libva_intel_driver:(staging)82fa52510a37ab645daaa3bb7091ff5096a20d0b
Kernel:	(drm-intel-next-queued) 3d21b86ca4bd5350c9e095db7d874c5e499f76d6

Bug detailed description:
------------------------- 
It happen on Pineview with mesa master branch. It doesn't happen on mesa 8.0 branch.

Following cases also aborted and have same bisect commit:
glx_GLX_ARB_create_context_color-index_render_type_with_3.0
glx_GLX_ARB_create_context_empty_attribute_list
glx_GLX_ARB_create_context_forward-compatible_flag_with_3.0
glx_GLX_ARB_create_context_forward-compatible_flag_with_pre-3.0
glx_GLX_ARB_create_context_invalid_OpenGL_version
glx_GLX_ARB_create_context_profile_pre-GL3_profile

Bisect shows:db273724c9484d513f5caa34729475d2873d9f7b is the first bad commit
commit db273724c9484d513f5caa34729475d2873d9f7b
Author:     Ian Romanick <ian.d.romanick@intel.com>
AuthorDate: Tue Aug 7 12:30:14 2012 -0700
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Mon Aug 13 17:36:50 2012 -0700

    i915: Validate API and version in i915CreateContext

    v2: Use base-10 for versions like gl_context::Version.  Suggested by Ken.

    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>


output:
*** glibc detected *** /GFX/Test/Piglit/piglit/framework/../bin/glx-create-context-valid-attribute-null: free(): invalid pointer: 0x0890f150 ***
======= Backtrace: =========
/lib/libc.so.6[0x4fe1ef92]
/opt/X11R7/lib/dri/i915_dri.so(i915CreateContext+0x370)[0xb7345450]
/opt/X11R7/lib/dri/i915_dri.so(+0x28988)[0xb7352988]
/opt/X11R7/lib/dri/i915_dri.so(+0x46739)[0xb7370739]
/opt/X11R7/lib/libGL.so.1(+0x47f1b)[0xb7685f1b]
/opt/X11R7/lib/libGL.so.1(+0x19b82)[0xb7657b82]
/GFX/Test/Piglit/piglit/framework/../bin/glx-create-context-valid-attribute-null(main+0x45)[0x8048d69]
/lib/libc.so.6(__libc_start_main+0xf3)[0x4fdc26b3]
/GFX/Test/Piglit/piglit/framework/../bin/glx-create-context-valid-attribute-null[0x8048c91]

Reproduce steps:
----------------
1. start X
2. ./bin/glx-create-context-valid-attribute-null
Comment 1 Ian Romanick 2012-09-27 01:00:03 UTC
Created attachment 67750 [details] [review]
First part of fix
Comment 2 Ian Romanick 2012-09-27 01:01:22 UTC
Created attachment 67751 [details] [review]
Second part of fix

Please try *both* of these patches.  Together they restore the (not quite correct) behavior before db273724c9 on my G33 system.  If this also works on PNV, please send a Tested-by.
Comment 3 lu hua 2012-09-27 09:05:28 UTC
Add these two patches into the latest commit 6d6aef79742ece3bb570.
This issue goes away.
Comment 4 Ian Romanick 2012-10-09 01:24:54 UTC
Fixed on master as of commit de958de.
Comment 5 lu hua 2012-10-10 03:23:16 UTC
Verified. Fixed on master branch commit 6ef37f71b0a0460808bb68a9102c15f313492c9f.