Bug 31337 - [softpipe] valgrind uninitialised value float_to_ubyte (u_math.h:457)
Summary: [softpipe] valgrind uninitialised value float_to_ubyte (u_math.h:457)
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/softpipe (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Brian Paul
QA Contact:
Depends on:
Reported: 2010-11-02 12:44 UTC by Vinson Lee
Modified: 2018-04-13 09:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2010-11-02 12:44:05 UTC
mesa: 1318b0ef9ee06d7cc5f69cf8be15c5b0fb31cabd (master)

Run piglit valgrind glsl-fs-texturecube test.

$ valgrind --track-origins=yes ./bin/glsl-fs-texturecube -auto
==9596== Conditional jump or move depends on uninitialised value(s)
==9596==    at 0x42CEABF: float_to_ubyte (u_math.h:454)
==9596==    by 0x42CF0F8: util_format_b8g8r8a8_unorm_pack_rgba_float (u_format_table.c:197)
==9596==    by 0x42CC413: util_format_write_4f (u_format.c:81)
==9596==    by 0x42F85F5: pipe_put_tile_rgba (u_tile.c:496)
==9596==    by 0x409D5FC: sp_flush_tile (sp_tile_cache.c:356)
==9596==    by 0x409D6BA: sp_flush_tile_cache (sp_tile_cache.c:386)
==9596==    by 0x4084560: softpipe_flush (sp_flush.c:86)
==9596==    by 0x408466E: softpipe_flush_resource (sp_flush.c:158)
==9596==    by 0x4083DCF: softpipe_get_transfer (sp_texture.c:328)
==9596==    by 0x4255C08: pipe_get_transfer (u_inlines.h:355)
==9596==    by 0x42569F9: st_readpixels (st_cb_readpixels.c:402)
==9596==    by 0x4120C67: _mesa_ReadPixels (readpix.c:232)
==9596==  Uninitialised value was created by a heap allocation
==9596==    at 0x4024DB9: memalign (vg_replace_malloc.c:581)
==9596==    by 0x4024E16: posix_memalign (vg_replace_malloc.c:709)
==9596==    by 0x40A9B80: os_malloc_aligned (os_memory_stdc.h:58)
==9596==    by 0x40AA4FD: xlib_displaytarget_create (xlib_sw_winsys.c:412)
==9596==    by 0x40834A8: softpipe_displaytarget_layout (sp_texture.c:95)
==9596==    by 0x40835FD: softpipe_resource_create (sp_texture.c:131)
==9596==    by 0x40A5847: xmesa_st_framebuffer_validate_textures (xm_st.c:184)
==9596==    by 0x40A5991: xmesa_st_framebuffer_validate (xm_st.c:237)
==9596==    by 0x40C1481: st_framebuffer_validate (st_manager.c:156)
==9596==    by 0x40C254F: st_api_make_current (st_manager.c:721)
==9596==    by 0x40A4EBC: XMesaMakeCurrent2 (xm_api.c:1146)
==9596==    by 0x40A7901: glXMakeContextCurrent (glx_api.c:1144)
Comment 1 Brian Paul 2010-11-02 17:29:34 UTC
Hmmm, I can't reproduce this.  I'm using Mesa 1318b0ef9ee06d7cc5f69cf8be15c5b0fb31cabd, softpipe on IA32, with and with/out SSE but valgrind shows no errors.  No errors on IA64 either.
Comment 2 Vinson Lee 2010-11-02 18:02:56 UTC
I can reproduce this bug on Ubuntu 10.10 i386 but not on Ubuntu 10.10 amd64.
Comment 3 Vinson Lee 2010-11-02 18:43:26 UTC
Ubuntu  9.10 i386 - pass
Ubuntu 10.04 i386 - pass
Ubuntu 10.10 i386 - fail
Ubuntu 11.04 i386 - fail

Ubuntu  9.10 amd64 - pass
Ubuntu 10.04 amd64 - pass
Ubuntu 10.10 amd64 - pass
Ubuntu 11.04 amd64 - pass

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.