Summary: | heap-use-after-free in glsl | ||
---|---|---|---|
Product: | Mesa | Reporter: | Bartosz Tomczyk <bartosz.tomczyk86> |
Component: | glsl-compiler | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | bartosz.tomczyk86, siglesias |
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Bartosz Tomczyk
2017-02-04 15:50:18 UTC
I am not able to reproduce it with current master (21efe2528cd88cb09ba9f69222f69a8ee47611c9), but I might have something wrong. My CFLAGS and CXXFLAGS are "-Wall -g -O0 -fsanitize=address -fno-omit-frame-pointer". Please share your setup (Mesa commit/version you compiled, the environment variables you used, autogen.sh parameters...) to see if I can reproduce it here. Hi Samuel, I don't have setup to reproduce it right now. I will update you will more details in the evening. But I looked at current mesa git and the bug is definitively there. Look at src/compiler/glsl/ast_to_hir.cpp:5210 - function get_variable_being_redeclared can free 'var', and then it could be dereferenced at src/compiler/glsl/ast_to_hir.cpp:5266. This is exactly what address sanitizer showed. (In reply to Bartosz Tomczyk from comment #2) > Hi Samuel, > > I don't have setup to reproduce it right now. I will update you will more > details in the evening. > > But I looked at current mesa git and the bug is definitively there. > > Look at src/compiler/glsl/ast_to_hir.cpp:5210 - function > get_variable_being_redeclared can free 'var', and then it could be > dereferenced at src/compiler/glsl/ast_to_hir.cpp:5266. This is exactly what > address sanitizer showed. Right. Thanks! I have sent a patch to fix this: https://lists.freedesktop.org/archives/mesa-dev/2017-February/143329.html Would you mind testing it with address sanitizer? I would like to confirm this error disappears with the patch :) Patch pushed to master. I am closing the bug :-) commit a73a61893323c74f38b1baa30d63a5cc665b7b58 Author: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Date: Thu Feb 9 13:54:46 2017 +0100 glsl: fix heap-use-after-free in ast_declarator_list::hir() |
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.