nptl: x86_64: Use same code for CURRENT_STACK_FRAME and stackinfo_get_sp
commit8cd559cf5afe3894f92c2be6f972e1a4e38c56ca
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 8 Mar 2022 20:31:08 +0000 (8 17:31 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 31 Aug 2022 12:04:27 +0000 (31 09:04 -0300)
treec2f781b04f9ddad1012a60eecb5facca19410e5c
parentc7509d49c4e8fa494120c5ead21338559dad16f5
nptl: x86_64: Use same code for CURRENT_STACK_FRAME and stackinfo_get_sp

It avoids the possible warning of uninitialized 'frame' variable when
building with clang:

  ../sysdeps/nptl/jmp-unwind.c:27:42: error: variable 'frame' is
  uninitialized when used here [-Werror,-Wuninitialized]
    __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);

The resulting code is similar to CURRENT_STACK_FRAME.

Checked on x86_64-linux-gnu.
sysdeps/x86/nptl/pthreaddef.h
sysdeps/x86_64/stackinfo.h