https://bugs.kde.org/show_bug.cgi?id=479997

            Bug ID: 479997
           Summary: Segmentation fault on 32bit arm checking programs
                    built with -fstack-clash-protection or -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,
I found a small reproducer for the segmentation fault mentioned in
https://bugs.kde.org/show_bug.cgi?id=479699.

Please note that the error can be reproduced with either
-fstack-clash-protection or -fstack-check. This issue is similar to
https://bugs.kde.org/show_bug.cgi?id=479996 - but you need a larger buffer on
64 bit.

  // example.c
  void a_function() { char buf[8192]; }
  int main() { a_function(); }

gcc -fstack-clash-protection example.c -o example && valgrind ./example
==2743356== Memcheck, a memory error detector
==2743356== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==2743356== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==2743356== Command: ./example
==2743356== 
==2743356== 
==2743356== Process terminating with default action of signal 11 (SIGSEGV)
==2743356==  Access not within mapped region at address 0xFEF0CB04
==2743356==    at 0x1084EA: a_function (in /tmp/example)
==2743356==  If you believe this happened as a result of a stack
==2743356==  overflow in your program's main thread (unlikely but
==2743356==  possible), you can try to increase the size of the
==2743356==  main thread stack using the --main-stacksize= flag.
==2743356==  The main thread stack size used in this run was 8388608.
==2743356== 
==2743356== HEAP SUMMARY:
==2743356==     in use at exit: 0 bytes in 0 blocks
==2743356==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==2743356== 
==2743356== All heap blocks were freed -- no leaks are possible
==2743356== 
==2743356== For lists of detected and suppressed errors, rerun with: -s
==2743356== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
Segmentation fault

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to