]> git.ipfire.org Git - thirdparty/glibc.git/commit
nptl: Add test for callee-saved register restore in pthread_exit
authorFlorian Weimer <fweimer@redhat.com>
Mon, 8 Jan 2018 13:57:25 +0000 (14:57 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 15 Jan 2018 14:24:38 +0000 (15:24 +0100)
commit477cd2b1830c719f2b074f259c28dddcef8687bf
tree2476e4935ee10bc7d1e74ff67b2147aaaed5a6c6
parentc247c5366581ce0948de0cde22a49e2bf8c538df
nptl: Add test for callee-saved register restore in pthread_exit

GCC PR 83641 results in a miscompilation of libpthread, which
causes pthread_exit not to restore callee-saved registers before
running destructors for objects on the stack.  This test detects
this situation:

info: unsigned int, direct pthread_exit call
tst-thread-exit-clobber.cc:80: numeric comparison failure
   left: 4148288912 (0xf741dd90); from: value
  right: 1600833940 (0x5f6ac994); from: magic_values.v2
info: double, direct pthread_exit call
info: unsigned int, indirect pthread_exit call
info: double, indirect pthread_exit call
error: 1 test failures

(cherry picked from commit 579396ee082565ab5f42ff166a264891223b7b82)
ChangeLog
nptl/Makefile
nptl/tst-thread-exit-clobber.cc [new file with mode: 0644]