/* { dg-do run } */ /* { dg-require-effective-target hwaddress_exec } */ /* { dg-shouldfail "hwasan" } */ int __attribute__ ((noinline)) check_vararray (int num) { int var_array[num]; int other_array[10]; return var_array[12]; } int __attribute__ ((noinline)) main () { return check_vararray (3); } /* { dg-output "HWAddressSanitizer: tag-mismatch on address 0x\[0-9a-f\]*.*" } */ /* { dg-output "READ of size 4 at 0x\[0-9a-f\]* tags: \[\[:xdigit:\]\]\[\[:xdigit:\]\]/\[\[:xdigit:\]\]\[\[:xdigit:\]\].*\\(ptr/mem\\) in thread T0.*" } */ /* { dg-output "Address 0x\[0-9a-f\]* is located in stack of thread T0.*" } */ /* { dg-output "SUMMARY: HWAddressSanitizer: tag-mismatch \[^\n\]*.*" } */