mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Commitff026950e2("Add a C wrapper for prctl [BZ #25896]") replaced the assembler wrapper with a C function. However, on powerpc64le-linux-gnu, the C variadic function implementation requires extra work in the caller to set up the parameter save area. Calling a function that needs a parameter save area without one (because the prototype used indicates the function is not variadic) corrupts the caller's stack. The Linux manual pages project documents prctl as a non-variadic function. This has resulted in various projects over the years using non-variadic prototypes, including the sanitizer libraries in LLVm and GCC (GCC PR 113728). This commit switches back to the assembler implementation on most targets and only keeps the C implementation for x86-64 x32. Also add the __prctl_time64 alias from commitb39ffab860("Linux: Add time64 alias for prctl") to sysdeps/unix/sysv/linux/syscalls.list; it was not yet present in commitff026950e2. This restores the old ABI on powerpc64le-linux-gnu, thus fixing bug 29770. Reviewed-By: Simon Chopin <simon.chopin@canonical.com>
4.8 KiB
4.8 KiB