https://bugs.kde.org/show_bug.cgi?id=479996
Bug ID: 479996 Summary: Segmentation fault on aarch64 checking programs built with -fstack-check Classification: Developer tools Product: valgrind Version: 3.20.0 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: e...@debian.org Target Milestone: --- Hi, On aarch64, using valgrind on the following program built with -fstack-check results in a segmentation fault: // example.c void a_function() { char buf[10752]; } int main() { a_function(); } gcc -fstack-check example.c -o example && valgrind ./example ==2743238== Memcheck, a memory error detector ==2743238== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==2743238== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info ==2743238== Command: ./example ==2743238== ==2743238== Invalid write of size 8 ==2743238== at 0x10873C: main (in /tmp/example) ==2743238== Address 0x1ffefff9c0 is on thread 1's stack ==2743238== 4112 bytes below stack pointer ==2743238== ==2743238== Invalid write of size 8 ==2743238== at 0x108718: a_function (in /tmp/example) ==2743238== by 0x10874B: main (in /tmp/example) ==2743238== Address 0x1ffeffe9c0 is on thread 1's stack ==2743238== 8192 bytes below stack pointer ==2743238== ==2743238== Invalid write of size 8 ==2743238== at 0x108720: a_function (in /tmp/example) ==2743238== by 0x10874B: main (in /tmp/example) ==2743238== Address 0x1ffeffdfc0 is not stack'd, malloc'd or (recently) free'd ==2743238== ==2743238== ==2743238== Process terminating with default action of signal 11 (SIGSEGV) ==2743238== Access not within mapped region at address 0x1FFEFFDFC0 ==2743238== at 0x108720: a_function (in /tmp/example) ==2743238== by 0x10874B: main (in /tmp/example) ==2743238== If you believe this happened as a result of a stack ==2743238== overflow in your program's main thread (unlikely but ==2743238== possible), you can try to increase the size of the ==2743238== main thread stack using the --main-stacksize= flag. ==2743238== The main thread stack size used in this run was 8388608. ==2743238== ==2743238== HEAP SUMMARY: ==2743238== in use at exit: 0 bytes in 0 blocks ==2743238== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==2743238== ==2743238== All heap blocks were freed -- no leaks are possible ==2743238== ==2743238== For lists of detected and suppressed errors, rerun with: -s ==2743238== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) Segmentation fault -- You are receiving this mail because: You are watching all bug changes.