Bug 33823 - [glsl] ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed.
Summary: [glsl] ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed.
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: All All
: medium critical
Assignee: Kenneth Graunke
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 12:42 UTC by Vinson Lee
Modified: 2011-04-13 20:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2011-02-01 12:42:44 UTC
mesa: 3c701f1d61b33a5ffaddd4199ac277da8e287f30 (master)

Run piglit invalid-logic-not-05 test.

$ ./bin/glslparsertest tests/spec/glsl-1.10/compiler/expressions/invalid-logic-not-05.vert fail
glslparsertest: ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed.

(gdb) bt
#0  0x00e18416 in __kernel_vsyscall ()
#1  0x006a2941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x006a5e42 in abort () at abort.c:92
#3  0x0069b8e8 in __assert_fail (assertion=0x45c951 "info->canary == 0x5A1106", file=0x45c948 "ralloc.c", line=78, function=0x45ca05 "get_header") at assert.c:81
#4  0x00282171 in get_header (ptr=0xbfe4e3cc) at ralloc.c:78
#5  0x00282226 in ralloc_size (ctx=0xbfe4e3cc, size=6) at ralloc.c:109
#6  0x00282a6e in ralloc_vasprintf (ctx=0xbfe4e3cc, fmt=0x4fc6f9 "%s ", args=0xbfe4e3b8 "`\260\236\t\210\260\236\t\320J\305\t\270\344\344\277\a\307O") at ralloc.c:414
#7  0x002829b1 in ralloc_asprintf (ctx=0xbfe4e3cc, fmt=0x4fc6f9 "%s ") at ralloc.c:377
#8  0x0037b9ff in prototype_string (return_type=0x52e8b8, name=0x9b3fec8 "A", parameters=0x9d163a8) at ast_function.cpp:78
#9  0x0037c244 in match_function_by_name (instructions=0x9d16760, name=0x9b260d8 "A", loc=0xbfe4e4a0, actual_parameters=0xbfe4e4b4, state=0x9b25670) at ast_function.cpp:236
#10 0x0037f4e1 in ast_function_expression::hir (this=0x9b26150, instructions=0x9d16760, state=0x9b25670) at ast_function.cpp:1274
#11 0x00287ad8 in ast_expression_statement::hir (this=0x9b25be0, instructions=0x9d16760, state=0x9b25670) at ast_to_hir.cpp:1708
#12 0x00287b38 in ast_compound_statement::hir (this=0x9b264e0, instructions=0x9d16760, state=0x9b25670) at ast_to_hir.cpp:1724
#13 0x0028a623 in ast_function_definition::hir (this=0x9b25d38, instructions=0x9ae1120, state=0x9b25670) at ast_to_hir.cpp:3043
#14 0x002830ff in _mesa_ast_to_hir (instructions=0x9ae1120, state=0x9b25670) at ast_to_hir.cpp:85
#15 0x00280f02 in _mesa_glsl_compile_shader (ctx=0x9aafc08, shader=0x9b254a8) at program/ir_to_mesa.cpp:3133
#16 0x00222840 in compile_shader (ctx=0x9aafc08, shaderObj=1) at main/shaderapi.c:856
#17 0x00223189 in _mesa_CompileShaderARB (shaderObj=1) at main/shaderapi.c:1187
#18 0x0804aa59 in test () at piglit/tests/glslparsertest/glslparsertest.c:108
#19 0x0804aefd in main (argc=3, argv=0xbfe4e874) at piglit/tests/glslparsertest/glslparsertest.c:232

(gdb) frame 4
#4  0x00282171 in get_header (ptr=0xbfe4e3cc) at ralloc.c:78
78	   assert(info->canary == CANARY);
(gdb) print info->canary
$1 = 5228281
(gdb) print /x info->canary
$2 = 0x4fc6f9
Comment 1 Vinson Lee 2011-02-01 12:55:32 UTC
59c957b688651a4c7fa4660ee7a404bd83e8bb0b is the first bad commit
commit 59c957b688651a4c7fa4660ee7a404bd83e8bb0b
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Jan 31 14:06:38 2011 -0700

    glsl: add cast to silence signed/unsigned comparison warning

:040000 040000 9f63a9cde7d15dc462512e9367dd8daba556c3d8 f91d59473b6497c75d7db5156c1240786d26cc52 M	src
bisect run success
Comment 2 Kenneth Graunke 2011-02-01 23:57:26 UTC
commit cfd8d45ccde3252fd9a27fe0b2031a35f437a6a2
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Feb 1 23:31:35 2011 -0800

    glsl: Fix invalid use of ralloc_asprintf in prototype_string.
    
    This was my mistake when converting from talloc to ralloc.  I was
    confused because the other calls in the function are to asprintf_append
    and the original code used str as the context rather than NULL.
    
    Fixes bug #33823.
Comment 3 Vinson Lee 2011-04-13 20:14:19 UTC
mesa: a9a02c8a39620515ec9fd0d774ce329cf67ecb4e (master)

Verified fixed.


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.