<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Regression: Crash in 3Dmark2001"
href="https://bugs.freedesktop.org/show_bug.cgi?id=82828#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Regression: Crash in 3Dmark2001"
href="https://bugs.freedesktop.org/show_bug.cgi?id=82828">bug 82828</a>
from <span class="vcard"><a class="email" href="mailto:cwabbott0@gmail.com" title="Connor Abbott <cwabbott0@gmail.com>"> <span class="fn">Connor Abbott</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=82828#c5">comment #5</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=105451" name="attach_105451" title="full backtrace from piglit crash">attachment 105451</a> <a href="attachment.cgi?id=105451&action=edit" title="full backtrace from piglit crash">[details]</a></span>
> full backtrace from piglit crash
>
> (In reply to <a href="show_bug.cgi?id=82828#c4">comment #4</a>)
> > All the crashes are in the same place, right?
> >
> > Can you run it under gdb and print out n2 and the contents of
> > g->nodes[n].adjacency_list (it's an array with g->nodes[n].adjacency_count
> > elements) after the segfault? How about the former before the ra_simplify()
> > call in the ra_allocate() call that's segfaulting? (If you don't know how to
> > do this, see
> > <a href="http://stackoverflow.com/questions/2956889/how-to-set-a-counter-for-a-gdb">http://stackoverflow.com/questions/2956889/how-to-set-a-counter-for-a-gdb</a>-
> > breakpoint)
> >
> > I'm guessing that it's segfaulting because n2 is some bogus value. n2 comes
> > from the adjacency_list, which is something generated before the allocator
> > actually runs by code I didn't touch and then never modified afterward, and
> > the code that's segfaulting wasn't modified by the commit in question, so
> > the two most likely options I see are that either this is exposing a bug
> > somewhere else (like in r300g) or the new ra_simplify() is somehow
> > corrupting the adjacency_list. I don't know how r300g sets up the register
> > conflicts and register classes, though, so I can't guess why it works fine
> > on i965 but fails for r300g.
>
> OK, so not sure if I know what I'm doing but selecting one random crashing
> piglit test
>
> /bin/shader_runner tests/shaders/glsl-fs-loop-continue.shader_test -auto
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb76391a9 in ra_select (g=0x80c2058) at
> ../../src/mesa/program/register_allocate.c:525
> 525 BITSET_TEST(g->regs->regs[r].conflicts, g->nodes[n2].reg)) {
>
> print n2
> $2 = 0
>
> print n
> $7 = 1
>
> print g->nodes[n].adjacency_count
> $1 = 3
>
> print g->nodes[n].adjacency_list
> $3 = (unsigned int *) 0x80c1b58
>
> print g->nodes[n].adjacency_list[0]
> $4 = 1
>
> print g->nodes[n].adjacency_list[1]
> $5 = 0
>
> print g->nodes[n].adjacency_list[2]
> $6 = 2
>
> full backtrace attached.</span >
Can you print out the value of g->nodes[n2].reg? I think it may be NO_REG
(0xffffffff), even though it shouldn't be (if a node is not on the stack, then
it's supposed to be assigned a register already).
(In reply to <a href="show_bug.cgi?id=82828#c5">comment #5</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=105451" name="attach_105451" title="full backtrace from piglit crash">attachment 105451</a> <a href="attachment.cgi?id=105451&action=edit" title="full backtrace from piglit crash">[details]</a></span>
> full backtrace from piglit crash
>
> (In reply to <a href="show_bug.cgi?id=82828#c4">comment #4</a>)
> > All the crashes are in the same place, right?
> >
> > Can you run it under gdb and print out n2 and the contents of
> > g->nodes[n].adjacency_list (it's an array with g->nodes[n].adjacency_count
> > elements) after the segfault? How about the former before the ra_simplify()
> > call in the ra_allocate() call that's segfaulting? (If you don't know how to
> > do this, see
> > <a href="http://stackoverflow.com/questions/2956889/how-to-set-a-counter-for-a-gdb">http://stackoverflow.com/questions/2956889/how-to-set-a-counter-for-a-gdb</a>-
> > breakpoint)
> >
> > I'm guessing that it's segfaulting because n2 is some bogus value. n2 comes
> > from the adjacency_list, which is something generated before the allocator
> > actually runs by code I didn't touch and then never modified afterward, and
> > the code that's segfaulting wasn't modified by the commit in question, so
> > the two most likely options I see are that either this is exposing a bug
> > somewhere else (like in r300g) or the new ra_simplify() is somehow
> > corrupting the adjacency_list. I don't know how r300g sets up the register
> > conflicts and register classes, though, so I can't guess why it works fine
> > on i965 but fails for r300g.
>
> OK, so not sure if I know what I'm doing but selecting one random crashing
> piglit test
>
> /bin/shader_runner tests/shaders/glsl-fs-loop-continue.shader_test -auto
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb76391a9 in ra_select (g=0x80c2058) at
> ../../src/mesa/program/register_allocate.c:525
> 525 BITSET_TEST(g->regs->regs[r].conflicts, g->nodes[n2].reg)) {
>
> print n2
> $2 = 0
>
> print n
> $7 = 1
>
> print g->nodes[n].adjacency_count
> $1 = 3
>
> print g->nodes[n].adjacency_list
> $3 = (unsigned int *) 0x80c1b58
>
> print g->nodes[n].adjacency_list[0]
> $4 = 1
>
> print g->nodes[n].adjacency_list[1]
> $5 = 0
>
> print g->nodes[n].adjacency_list[2]
> $6 = 2
>
> full backtrace attached.</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>