Summary: | [bisected] Anvil accesses uninitialized memory while compiling shaders | ||
---|---|---|---|
Product: | Mesa | Reporter: | Józef Kucia <joseph.kucia> |
Component: | Drivers/Vulkan/intel | Assignee: | Francisco Jerez <currojerez> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | currojerez, jason |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
config.log
Simple Vulkan program to reproduce the problem libvulkan_intel.so 17.3-branchpoint-1675-g35c3cbad3c30 0001-intel-fs-Initialize-fs_visitor-grf_used-on-construct.patch Hack 0001-intel-fs-bank_conflicts-Use-posix_memalign-instead-o.patch |
Description
Józef Kucia
2017-12-12 15:20:11 UTC
Possibly a duplicate of bug 104197 Can you share your config.log? vktrace of a misbehaving program would also be useful. Created attachment 136195 [details]
config.log
Created attachment 136196 [details]
Simple Vulkan program to reproduce the problem
Thank you. Would you mind sending me a copy of your libvulkan_intel.so binary in addition? Created attachment 136215 [details]
libvulkan_intel.so 17.3-branchpoint-1675-g35c3cbad3c30
Created attachment 136237 [details] [review] 0001-intel-fs-Initialize-fs_visitor-grf_used-on-construct.patch The attached patch should fix the valgrind error you pointed out. Strangely enough I have been unable to reproduce the crash, even while running the same binary you compiled yourself. The conditional jump depending on uninitialized memory doesn't explain the problem, it seems fully harmless. What platform are you running this on? And what exactly is the nature of the crash you're seeing? (segfault?) Created attachment 136238 [details] [review] Hack (In reply to Francisco Jerez from comment #7) > The attached patch should fix the valgrind error you pointed out. Strangely > enough I have been unable to reproduce the crash, even while running the > same binary you compiled yourself. The conditional jump depending on > uninitialized memory doesn't explain the problem, it seems fully harmless. > What platform are you running this on? And what exactly is the nature of > the crash you're seeing? (segfault?) Yes, the crash is unrelated to the valgrind error. It seems to be SSE alignment issue. The attached hack fixes the problem for me. What platform are you running this on? Created attachment 136240 [details] [review] 0001-intel-fs-bank_conflicts-Use-posix_memalign-instead-o.patch I think I would prefer to address the problem at the allocation point as in the attached patch. Can you confirm whether the attachment fixes the crash for you since I'm unable to reproduce it? (In reply to Francisco Jerez from comment #10) > Created attachment 136240 [details] [review] [review] > 0001-intel-fs-bank_conflicts-Use-posix_memalign-instead-o.patch > > I think I would prefer to address the problem at the allocation point as in > the attached patch. Can you confirm whether the attachment fixes the crash > for you since I'm unable to reproduce it? The patch fixes the crash. I'm not sure if it's the best solution though, e.g. _mesa_align_malloc() might be preferred instead of posix_memalign(). (In reply to Francisco Jerez from comment #9) > What platform are you running this on? Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz GenuineIntel GNU/Linux gcc (Gentoo 5.4.0-r3 p1.4, pie-0.6.5) 5.4.0 (In reply to Józef Kucia from comment #11) > (In reply to Francisco Jerez from comment #10) > > Created attachment 136240 [details] [review] [review] [review] > > 0001-intel-fs-bank_conflicts-Use-posix_memalign-instead-o.patch > > > > I think I would prefer to address the problem at the allocation point as in > > the attached patch. Can you confirm whether the attachment fixes the crash > > for you since I'm unable to reproduce it? > The patch fixes the crash. Great, I'll send it for review once I get some results from our CI. > I'm not sure if it's the best solution though, e.g. _mesa_align_malloc() might > be preferred instead of posix_memalign(). I shortly considered using _mesa_align_malloc(), however I don't think it's available to the vulkan driver. Not a big deal, I think posix_memalign should be fine, the i965 driver is not expected to run on Windows. Should be fixed in master now. Closing as resolved. |
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.