Bug 49066 - [Bisected i965]Oglc glsl-arrayobject(negative.constructorForOutArgument) regressed
Summary: [Bisected i965]Oglc glsl-arrayobject(negative.constructorForOutArgument) regr...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-22 19:21 UTC by lu hua
Modified: 2012-05-08 02:03 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2012-04-22 19:21:00 UTC
System Environment:
--------------------------
Arch:            i386
Platform:        Sandybridge
Libdrm:		(master)2.4.33-13-g73b9a2881c37990dee0afb9cb23a6a1e85339ede
Mesa:		(master)47d22e56de4738f792bb9a86da23435744d53f00
Xf86_video_intel:(master)2.18.0-219-gcaf9144271a10f90ea580c246b2df3f69a10b7a0
Libva:		(vaapi-ext)f12f80371fb534e6bbf248586b3c17c298a31f4e
Libva_intel_driver:(vaapi-ext)82fa52510a37ab645daaa3bb7091ff5096a20d0b
Kernel:	 (drm-intel-next-queued) 07ad4d14c7e37db174a9cdeb72f61d106a890c77

Bug detailed description:
-----------------------------
It segfault on sandybridge, ivybridge and ironlake with mesa master branch.It doesn't happen on mesa  8.0 branch.
Calltrace:
#0  0xb7fff424 in __kernel_vsyscall ()
#1  0x48ab6d71 in raise () from /lib/libc.so.6
#2  0x48ab864a in abort () from /lib/libc.so.6
#3  0xb7a5c5aa in ir_validate::visit_enter (this=0xbfffdfd4, ir=0xa31afc8)
    at ir_validate.cpp:598
#4  0xb7a5727c in ir_call::accept (this=0xa31afc8, v=0xbfffdfd4)
    at ir_hv_accept.cpp:332
#5  0xb7a56b5a in visit_list_elements (v=0xbfffdfd4, l=0xa31abfc,
    statement_list=true) at ir_hv_accept.cpp:56
#6  0xb7a56d4b in ir_function_signature::accept (this=0xa31abd8, v=0xbfffdfd4)
    at ir_hv_accept.cpp:136
#7  0xb7a56b5a in visit_list_elements (v=0xbfffdfd4, l=0xa31ab24,
    statement_list=false) at ir_hv_accept.cpp:56
#8  0xb7a56dbf in ir_function::accept (this=0xa31ab10, v=0xbfffdfd4)
    at ir_hv_accept.cpp:148
#9  0xb7a56b5a in visit_list_elements (v=0xbfffdfd4, l=0xa2726f8,
    statement_list=true) at ir_hv_accept.cpp:56
#10 0xb7a56afc in ir_hierarchical_visitor::run (this=0xbfffdfd4,
    instructions=0xa2726f8) at ir_hierarchical_visitor.cpp:291
#11 0xb7a5c370 in validate_ir_tree (instructions=0xa2726f8)
    at ir_validate.cpp:635
#12 0xb7cd2d8d in _mesa_glsl_compile_shader (ctx=0x9fb4bd0, shader=0xa2f0108)
    at program/ir_to_mesa.cpp:3169
---Type <return> to continue, or q <return> to quit---
#13 0xb7bcc4cd in compile_shader (ctx=0x9fb4bd0,
    shaderObj=<value optimized out>) at main/shaderapi.c:674
#14 0xb7e2cd5a in shared_dispatch_stub_529 (shader=8)
    at ../../../src/mapi/shared-glapi/glapi_mapi_tmp.h:16584
#15 0x0849d9e9 in GLSLCompileShader(unsigned int, unsigned char) ()
#16 0x084a0cae in GLSLNegativeCompileOrLinkTest(GLSLSimpleTestContext*) ()
#17 0x0825cad0 in GLSLArrayObjectExec(testParameters*) ()
#18 0x08f1dd58 in callFunctionHandleExceptionsInner(long (*)(testParameters*), testParameters*, char*) ()
#19 0x08f1dea7 in callFunctionHandleExceptions(long (*)(testParameters*), testParameters*) ()
#20 0x08f1c959 in DriverExec(long (*)(testParameters*), testParameters*) ()
#21 0x08efdc2f in Driver(std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::vector<driverRec*, std::allocator<driverRec*> > const&, std::vector<boost::shared_ptr<PrePostTestAction>, std::allocator<boost::shared_ptr<PrePostTestAction> > > const&, std::vector<boost::shared_ptr<PrePostTestcaseAction>, std::allocator<boost::shared_ptr<PrePostTestcaseAction> > > const&) ()
#22 0x08efe35e in (anonymous namespace)::MyMessagePump::idle() ()
#23 0x08ed0b4a in MessagePump::process_messages() ()
---Type <return> to continue, or q <return> to quit---
#24 0x08efe87c in ExecutionManager::execute_schedules() ()
#25 0x08e89cbb in tkShellExecute(std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) ()
#26 0x08e933e2 in main ()

Bisect shows:f2475ca424f7e001be50f64dafa5700f6603d684 is the first bad commit
commit f2475ca424f7e001be50f64dafa5700f6603d684
Author:     Eric Anholt <eric@anholt.net>
AuthorDate: Thu Mar 29 17:02:15 2012 -0700
Commit:     Eric Anholt <eric@anholt.net>
CommitDate: Thu Apr 19 16:33:36 2012 -0700

    glsl: Track in each ir_variable whether it was ever assigned.

    This will be used for some compile-and-link-time error checking, where
    currently we've been doing error checking only at link time.

    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

Reproduce steps:
----------------
1. start X
2. ./oglconform -z -suite all -v 2 -D 117 -test glsl-arrayobject negative.constructorForOutArgument
Comment 1 Eric Anholt 2012-05-04 14:51:16 UTC
commit 4595288ba844def45cc858fab44fad3efa1ab4c8
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Apr 23 17:24:13 2012 -0700

    glsl: Fix regression in function out-parameter lvalue detection.
    
    When doing the var->assigned change in
    f2475ca424f7e001be50f64dafa5700f6603d684, I overzealously indented the
    second block of code into the "if (var)" test.  Revert these blocks to
    the way they were before, just taking advantage of "var" to avoid
    re-calling variable_referenced().
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49066
Comment 2 lu hua 2012-05-08 02:03:25 UTC
Verified. Fixed on commit c19672f90a653a8bd6adcc35e294b7150b34f9e7.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.