[Mesa-dev] [PATCH 2/3] glsl: Reenable opt_copy_propagation_elements.cpp.

David Lamparter equinox at diac24.net
Sun Apr 3 21:41:54 PDT 2011


On Sat, Apr 02, 2011 at 11:15:21PM -1000, Eric Anholt wrote:
> -   /*progress = do_copy_propagation_elements(ir) || progress;*/
> +   progress = do_copy_propagation_elements(ir) || progress

mesa git 6caac3ecb... plus some other unrelated stuff (Marek's float
patches) and your three patches, r600g on RV630. SEGV disappears when
popping the 3 copy_propagation related patches off the top.

reproducable SEGV on wine here, after login screen on EVE Online:


wine: Unhandled page fault on write access to 0x00000004 at address 0xf6c55615 (thread 003e), starting debugger...
[...snip...]
  14 0xdeadbabe (0x0033a3fc)
  15 0xf6c55dbd ir_copy_propagation_elements_visitor::visit_leave(ir_assignment*)+0xfc() in r600_dri.so (0x0033a45c)
  16 0xf6c55dbd ir_copy_propagation_elements_visitor::visit_leave(ir_assignment*)+0xfc() in r600_dri.so (0x0033a49c)
  17 0xf6d2bcd9 ir_assignment::accept(ir_hierarchical_visitor*)+0xd8() in r600_dri.so (0x0033a4dc)
  18 0xf6d2b4b7 visit_list_elements+0x46(v=0x33a718, l=0x7d002ae4) [/root/gl/mesa/src/glsl/ir_hv_accept.cpp:48] in r600_dri.so (0x0033a53c)
  19 0xf6c55739 ir_copy_propagation_elements_visitor::visit_enter(ir_loop*)+0xa8() in r600_dri.so (0x0033a57c)
  20 0xf6d2b55c ir_loop::accept(ir_hierarchical_visitor*)+0x2b() in r600_dri.so (0x0033a5bc)
  21 0xf6d2b4b7 visit_list_elements+0x46(v=0x33a718, l=0x7d00db10) [/root/gl/mesa/src/glsl/ir_hv_accept.cpp:48] in r600_dri.so (0x0033a60c)
  22 0xf6c55291 ir_copy_propagation_elements_visitor::visit_enter(ir_function_signature*)+0xa0() in r600_dri.so (0x0033a63c)
  23 0xf6d2b695 ir_function_signature::accept(ir_hierarchical_visitor*)+0x24() in r600_dri.so (0x0033a67c)
  24 0xf6d2b4b7 visit_list_elements+0x46(v=0x33a718, l=0x7d00b8f8) [/root/gl/mesa/src/glsl/ir_hv_accept.cpp:48] in r600_dri.so (0x0033a6ac)
  25 0xf6d2b757 ir_function::accept(ir_hierarchical_visitor*)+0x56() in r600_dri.so (0x0033a6ec)
  26 0xf6d2b4b7 visit_list_elements+0x46(v=0x33a718, l=0x7c52e740) [/root/gl/mesa/src/glsl/ir_hv_accept.cpp:48] in r600_dri.so (0x0033a75c)
  27 0xf6c55f02 do_copy_propagation_elements+0xb1(instructions=0x7c52e740) [/root/gl/mesa/src/glsl/opt_copy_propagation_elements.cpp:462] in r600_dri.so (0x0033a7cc)
  28 0xf6c4a2cb do_common_optimization+0x9a(ir=0x7c52e740, linked=true, max_unroll_iterations=0x20) [/root/gl/mesa/src/glsl/glsl_parser_extras.cpp:772] in r600_dri.so (0x0033a83c)
  29 0xf6d3674f link_shaders+0x28e(ctx=0x7c6c8fd0, prog=0x7c49c090) [/root/gl/mesa/src/glsl/linker.cpp:1639] in r600_dri.so (0x0033a88c)
  30 0xf6d06537 _mesa_glsl_link_shader+0x216(ctx=0x7c6c8fd0, prog=0x7c49c090) [/root/gl/mesa/src/mesa/program/ir_to_mesa.cpp:3286] in r600_dri.so (0x0033a8dc)
  31 0xf6cb2d6c link_program+0x6b(ctx=0x7c6c8fd0, program=<is not available>) [/root/gl/mesa/src/mesa/main/shaderapi.c:885] in r600_dri.so (0x0033a8ec)
  32 0xf7019ff7 glLinkProgramARB+0x26() in libgl.so.1 (0x0033aafc)
  33 0xf70ed706 in wined3d (+0xd705) (0x0033accc)

fault location (f6c55615) is
exec_node::remove()():
/root/gl/mesa/src/glsl/list.h:125
     next->prev = prev;
   62610:       8b 78 04                mov    0x4(%eax),%edi
   62613:       8b 30                   mov    (%eax),%esi
-> 62615:       89 7e 04                mov    %edi,0x4(%esi)

which is inlined for
00062590 <ir_copy_propagation_elements_visitor::kill(kill_entry*)>:
	 if (entry->write_mask == 0)
	    entry->remove();
      }
      if (entry->rhs == k->var) {
->	 entry->remove();
      }
   }

the call to ::kill comes from src/glsl/opt_copy_propagation_elements.cpp:174
being ir_copy_propagation_elements_visitor::visit_leave(ir_assignment*)


Will try to get some more debug output, but that box is a grsecurity'd
32bit chroot on 64bit host - never got gdb to work on this...


-David



More information about the mesa-dev mailing list