https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111736

--- Comment #46 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 58259
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58259&action=edit
Preprocessed file

gcc -O2 -fsanitize=kernel-address -fasan-shadow-offset=0xdffffc0000000000
--param asan-instrumentation-with-call-threshold=10000 -fsanitize=bool -S
alternative.i

results in:

        movabsq $-2305847407260205056, %rdx
        movl    $cpu_tlbstate_shared, %eax
        shrq    $3, %rax
        movzbl  (%rax,%rdx), %eax
        testb   %al, %al
        je      .L399
        jle     .L473
.L399:
        movzbl  %gs:cpu_tlbstate_shared(%rip), %r14d
        cmpb    $1, %r14b

which is wrong. %gs: prefixed addresses should not be sanitized.

Reply via email to