diff options
author | Stafford Horne <shorne@gmail.com> | 2021-10-15 06:17:41 +0900 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-10-18 17:17:20 -0300 |
commit | 1d550265a75b412cea4889a50b101395f6a8e025 (patch) | |
tree | 00b87206c3fc25b70893277d273e831e52462edb /math/w_j1_compat.c | |
parent | ad6feef1b0c2cc6d7ad29c5cc4e14ba16f360f06 (diff) | |
download | glibc-1d550265a75b412cea4889a50b101395f6a8e025.tar glibc-1d550265a75b412cea4889a50b101395f6a8e025.tar.gz glibc-1d550265a75b412cea4889a50b101395f6a8e025.tar.bz2 glibc-1d550265a75b412cea4889a50b101395f6a8e025.zip |
timex: Use 64-bit fields on 32-bit TIMESIZE=64 systems (BZ #28469)
This was found when testing the OpenRISC port I am working on. These
two tests fail with SIGSEGV:
FAIL: misc/tst-ntp_gettime
FAIL: misc/tst-ntp_gettimex
This was found to be due to the kernel overwriting the stack space
allocated by the timex structure. The reason for the overwrite being
that the kernel timex has 64-bit fields and user space code only
allocates enough stack space for timex with 32-bit fields.
On 32-bit systems with TIMESIZE=64 __USE_TIME_BITS64 is not defined.
This causes the timex structure to use 32-bit fields with type
__syscall_slong_t.
This patch adjusts the ifdef condition to allow 32-bit systems with
TIMESIZE=64 to use the 64-bit long long timex definition.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'math/w_j1_compat.c')
0 files changed, 0 insertions, 0 deletions