Package: valgrind
Version: 1:3.20.0-2.1
Severity: important
User: debian-...@lists.debian.org
Usertags: 32bit-stackclash
Tags: upstream

On armhf, valgrind dies with a SIGSEGV when checking certain programs
built with either -fstack-clash-protection or -fstack-check.

The following example is a reproducer:

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

The issue can be reproduced with:

  $ 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

Reply via email to