mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
Test for mprotect failure in dl-load.c (bug 12492).
This commit is contained in:
committed by
Joseph Myers
parent
ce61a2ad2e
commit
0432680e8c
@@ -1487,7 +1487,11 @@ cannot allocate TLS data structures for initial thread");
|
||||
if (__builtin_expect (p + s <= relro_end, 1))
|
||||
{
|
||||
/* The variable lies in the region protected by RELRO. */
|
||||
__mprotect ((void *) p, s, PROT_READ|PROT_WRITE);
|
||||
if (__mprotect ((void *) p, s, PROT_READ|PROT_WRITE) < 0)
|
||||
{
|
||||
errstring = N_("cannot change memory protections");
|
||||
goto call_lose_errno;
|
||||
}
|
||||
__stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
|
||||
__mprotect ((void *) p, s, PROT_READ);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user