diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-08-22 11:04:47 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2022-09-03 22:25:40 +0200 |
commit | c85eae908a45a99e417381732ca0cbc3f8869561 (patch) | |
tree | 17079d0342c160769062deafa6d67c938bcd038c | |
parent | stdlib: Fixup mbstowcs NULL __dst handling. [BZ #29279] (diff) | |
download | glibc-c85eae908a45a99e417381732ca0cbc3f8869561.tar.gz glibc-c85eae908a45a99e417381732ca0cbc3f8869561.tar.bz2 glibc-c85eae908a45a99e417381732ca0cbc3f8869561.zip |
alpha: Fix generic brk system call emulation in __brk_call (bug 29490)
The kernel special-cases the zero argument for alpha brk, and we can
use that to restore the generic Linux error handling behavior.
Fixes commit b57ab258c1140bc45464b4b9908713e3e0ee35aa ("Linux:
Introduce __brk_call for invoking the brk system call").
(cherry picked from commit e7ad26ee3cb74e61d0637c888f24dd478d77af58)
(cherry picked from commit 4bafc4001d97ad9501168e091c70f69bd50d9bd9)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/brk_call.h | 7 |
2 files changed, 4 insertions, 4 deletions
@@ -52,6 +52,7 @@ The following bugs are resolved with this release: [29225] network: Mistyped define statement in socket/sys/socket.h in line 184 [29446] _dlopen now ignores dl_caller argument in static mode + [29490] alpha: New __brk_call implementation is broken Version 2.35 diff --git a/sysdeps/unix/sysv/linux/alpha/brk_call.h b/sysdeps/unix/sysv/linux/alpha/brk_call.h index b8088cf13f..0b851b6c86 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk_call.h +++ b/sysdeps/unix/sysv/linux/alpha/brk_call.h @@ -21,8 +21,7 @@ __brk_call (void *addr) { unsigned long int result = INTERNAL_SYSCALL_CALL (brk, addr); if (result == -ENOMEM) - /* Mimic the default error reporting behavior. */ - return addr; - else - return (void *) result; + /* Mimic the generic error reporting behavior. */ + result = INTERNAL_SYSCALL_CALL (brk, 0); + return (void *) result; } |