diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-05-22 09:12:28 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-05-22 09:12:28 +0200 |
commit | d3c506eff54fcbac389a529c2e98da108a410b7f (patch) | |
tree | bd6c9eabf320895944687f0defa001963259263e /gcc/except.cc | |
parent | 73a167cfa225d5ee7092d41596b9fea1719898ff (diff) | |
download | gcc-d3c506eff54fcbac389a529c2e98da108a410b7f.zip gcc-d3c506eff54fcbac389a529c2e98da108a410b7f.tar.gz gcc-d3c506eff54fcbac389a529c2e98da108a410b7f.tar.bz2 |
ubsan: Use right address space for MEM_REF created for bool/enum sanitization [PR115172]
The following testcase is miscompiled, because -fsanitize=bool,enum
creates a MEM_REF without propagating there address space qualifiers,
so what should be normally loaded using say %gs:/%fs: segment prefix
isn't. Together with asan it then causes that load to be sanitized.
2024-05-22 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/115172
* ubsan.cc (instrument_bool_enum_load): If rhs is not in generic
address space, use qualified version of utype with the right
address space. Formatting fix.
* gcc.dg/asan/pr115172.c: New test.
Diffstat (limited to 'gcc/except.cc')
0 files changed, 0 insertions, 0 deletions