[Bug 104226] [bisected] Anvil accesses uninitialized memory while compiling shaders

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Dec 12 15:20:11 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=104226

            Bug ID: 104226
           Summary: [bisected] Anvil accesses uninitialized memory while
                    compiling shaders
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/intel
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: joseph.kucia at gmail.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org
                CC: jason at jlekstrand.net

This seems to cause a crash in any 32-bit application I've tried. For 64-bit
applications there are just uninitialized memory accesses without crashes.

This is a regression:

commit af2c320190f3c73180f1610c8df955a7fa2a4d09
Author: Francisco Jerez <currojerez at riseup.net>
Date:   Thu Jun 15 15:23:57 2017 -0700

    intel/fs: Implement GRF bank conflict mitigation pass.

The patch from bug 104199 doesn't help.

(gdb) bt
#0  0xf79784ba in (anonymous namespace)::weight_vector_type::weight_vector_type
(n=136416036, this=<optimized out>)
    at ../../../mesa-git/src/intel/compiler/brw_fs_bank_conflicts.cpp:281
#1  (anonymous namespace)::shader_conflict_weight_matrix (v=0x8218d30,
v=0x8218d30, p=<optimized out>)
    at ../../../mesa-git/src/intel/compiler/brw_fs_bank_conflicts.cpp:591
#2  fs_visitor::opt_bank_conflicts (this=0xffff7d44)
    at ../../../mesa-git/src/intel/compiler/brw_fs_bank_conflicts.cpp:878
#3  0xf799c941 in fs_visitor::allocate_registers (this=0xffff7d44,
min_dispatch_width=8, allow_spilling=true)
    at ../../../mesa-git/src/intel/compiler/brw_fs.cpp:6120
#4  0xf799e95f in fs_visitor::run_vs (this=0xffff7d44) at
../../../mesa-git/src/intel/compiler/brw_fs.cpp:6191
#5  0xf7a238d2 in brw_compile_vs (compiler=0x808c158, log_data=0x0,
mem_ctx=0x8117678, key=0xffffa44c, 
    prog_data=0xffffa508, src_shader=0x8184868, use_legacy_snorm_formula=false,
shader_time_index=-1, error_str=0x0)
    at ../../../mesa-git/src/intel/compiler/brw_vec4.cpp:2865
#6  0xf78fa3e6 in anv_pipeline_compile_vs (pipeline=pipeline at entry=0x81836a8,
cache=cache at entry=0x0, 
    module=module at entry=0x8182ad0, entrypoint=0x804c6c0 "main", spec_info=0x0,
info=0xffffca50)
    at ../../../mesa-git/src/intel/vulkan/anv_pipeline.c:546
#7  0xf78fc1cb in anv_pipeline_init (pipeline=0x81836a8, device=0x82103f8,
cache=0x0, pCreateInfo=0xffffca50, 
    alloc=<optimized out>) at
../../../mesa-git/src/intel/vulkan/anv_pipeline.c:1319
#8  0xf793f551 in gen9_graphics_pipeline_create (pPipeline=<optimized out>,
pAllocator=<optimized out>, 
    pCreateInfo=<optimized out>, cache=<optimized out>, _device=<optimized
out>)
    at ../../../mesa-git/src/intel/vulkan/genX_pipeline.c:1661
#9  gen9_CreateGraphicsPipelines (_device=0x82103f8, pipelineCache=0, count=1,
pCreateInfos=0xffffca50, 
    pAllocator=0x0, pPipelines=0xffffc980) at
../../../mesa-git/src/intel/vulkan/genX_pipeline.c:1864
#10 0xf7fa02b8 in vkCreateGraphicsPipelines () from
/home/joseph/src/vulkan/vulkan-build32/loader/libvulkan.so.1
#11 0x08049dab in create_graphics_pipeline ()
#12 0x0804b67e in main ()

==19019== Conditional jump or move depends on uninitialised value(s)
==19019==    at 0x6182B28: fs_visitor::bank_conflict_cycles(fs_inst const*)
const (brw_fs_bank_conflicts.cpp:906)
==19019==    by 0x620945F:
fs_instruction_scheduler::issue_time(backend_instruction*)
(brw_schedule_instructions.cpp:1546)
==19019==    by 0x620AF8D: instruction_scheduler::compute_delays()
(brw_schedule_instructions.cpp:831)
==19019==    by 0x620F2E1: instruction_scheduler::run(cfg_t*)
(brw_schedule_instructions.cpp:1701)
==19019==    by 0x620F4F0:
fs_visitor::schedule_instructions(instruction_scheduler_mode)
(brw_schedule_instructions.cpp:1730)
==19019==    by 0x61A3D45: fs_visitor::allocate_registers(unsigned int, bool)
(brw_fs.cpp:6071)
==19019==    by 0x61A5BC1: fs_visitor::run_vs() (brw_fs.cpp:6191)
==19019==    by 0x6220CD2: brw_compile_vs (brw_vec4.cpp:2865)
==19019==    by 0x5FCB3CC: anv_pipeline_compile_vs.isra.13 (anv_pipeline.c:546)
==19019==    by 0x5FCD194: anv_pipeline_init (anv_pipeline.c:1319)
==19019==    by 0x60FCB27: gen9_graphics_pipeline_create (genX_pipeline.c:1661)
==19019==    by 0x60FCB27: gen9_CreateGraphicsPipelines (genX_pipeline.c:1864)
==19019==    by 0x4E67C2B: vkCreateGraphicsPipelines (trampoline.c:1257)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20171212/14937dbf/attachment-0001.html>


More information about the intel-3d-bugs mailing list