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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
While this doesn't seem to work with QEMU, it does work on real hardware (BPI):
=================================================================
==2225830==ERROR: AddressSanitizer: stack-use-after-scope on address
0x003ff5700028 at pc 0x0000000108ac bp 0x003ffffff960 sp 0x003ffffff948
READ of size 1 at 0x003ff5700028 thread T0
    #0 0x108aa in main (/tmp/a.out+0x108aa)
    #1 0x3ff77ce99a in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
    #2 0x3ff77cea42 in __libc_start_main_impl csu/libc-start.c:360
    #3 0x1076e in _start ../sysdeps/riscv/start.S:67

Address 0x003ff5700028 is located in stack of thread T0 at offset 40 in frame
    #0 0x107ec in main (/tmp/a.out+0x107ec)

  This frame has 1 object(s):
    [32, 41) 'my_char' (line 9) <== Memory access at offset 40 is inside this
variable
HINT: this may be a false positive if your program uses some custom stack
unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-scope (/tmp/a.out+0x108aa) in main

Reply via email to