Bug 10848

Summary: Invalid write in prog_statevars.c
Product: Mesa Reporter: Papadakos Panagiotis <papadako>
Component: Drivers/DRI/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Papadakos Panagiotis 2007-05-03 10:46:46 UTC
==5084== Invalid write of size 4
==5084==    at 0x4C9A2AE: _mesa_load_state_parameters (prog_statevars.c:340)
==5084==    by 0x4BF866F: r300VertexProgUpdateParams (r300_vertprog.c:120)
==5084==    by 0x4BF1354: r300SetupVertexProgram (r300_state.c:1715)
==5084==    by 0x4BF1517: r300SetupVertexShader (r300_state.c:1662)
==5084==    by 0x4BF19F9: r300UpdateShaderStates (r300_state.c:1801)
==5084==    by 0x4BF2772: r300_run_vb_render (r300_render.c:344)
==5084==    by 0x4BF30EE: r300_run_tcl_render (r300_render.c:534)
==5084==    by 0x4C74E3B: _tnl_run_pipeline (t_pipeline.c:158)
==5084==    by 0x4C75C4B: _tnl_draw_prims (t_draw.c:403)
==5084==    by 0x4C6F22D: vbo_exec_vtx_flush (vbo_exec_draw.c:215)
==5084==    by 0x4C6AF5F: vbo_exec_FlushVertices (vbo_exec_api.c:680)
==5084==    by 0x4C3283E: _mesa_LineWidth (lines.c:56)
==5084==  Address 0x65F1E80 is 0 bytes after a block of size 192 alloc'd
==5084==    at 0x40227F4: memalign (vg_replace_malloc.c:448)
==5084==    by 0x4022844: posix_memalign (vg_replace_malloc.c:549)
==5084==    by 0x4C2FA54: _mesa_align_malloc (imports.c:105)
==5084==    by 0x4C2FA7D: _mesa_align_realloc (imports.c:198)
==5084==    by 0x4C97CE0: _mesa_add_parameter (prog_parameter.c:102)
==5084==    by 0x4C97EC3: _mesa_add_state_reference (prog_parameter.c:416)
==5084==    by 0x4BF629F: build_program (r300_vertprog.c:899)
==5084==    by 0x4BF85B1: r300_select_vertex_shader (r300_vertprog.c:1114)
==5084==    by 0x4BF11E7: r300UpdateShaders (r300_state.c:1774)
==5084==    by 0x4BF30B9: r300_run_tcl_render (r300_render.c:504)
==5084==    by 0x4C74E3B: _tnl_run_pipeline (t_pipeline.c:158)
==5084==    by 0x4C75C4B: _tnl_draw_prims (t_draw.c:403)
Comment 1 Brian Paul 2007-05-03 11:33:33 UTC
Looks like the matrix state tokens in r300_vertprog.c position_invariant() were wrong.  I'm checking in a fix in git.
Comment 2 Papadakos Panagiotis 2007-05-03 12:27:19 UTC
(In reply to comment #1)
> Looks like the matrix state tokens in r300_vertprog.c position_invariant() were
> wrong.  I'm checking in a fix in git.
> 

Yep! It works! Closing!
Comment 3 Adam Jackson 2009-08-24 12:26:45 UTC
Mass version move, cvs -> git

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.