Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164831875
D32514.id97086.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
882 B
Referenced Files
None
Subscribers
None
D32514.id97086.diff
View Options
diff --git a/libexec/rtld-elf/rtld_malloc.c b/libexec/rtld-elf/rtld_malloc.c
--- a/libexec/rtld-elf/rtld_malloc.c
+++ b/libexec/rtld-elf/rtld_malloc.c
@@ -271,21 +271,21 @@
}
}
- if (pagepool_start == MAP_FAILED)
- pagepool_start = 0;
offset = (uintptr_t)pagepool_start - rounddown2(
(uintptr_t)pagepool_start, pagesz);
- pagepool_start = mmap(0, n * pagesz, PROT_READ | PROT_WRITE,
+ addr = mmap(0, n * pagesz, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, -1, 0);
- if (pagepool_start == MAP_FAILED) {
+ if (addr == MAP_FAILED) {
#ifdef IN_RTLD
rtld_fdprintf(STDERR_FILENO, _BASENAME_RTLD ": morepages: "
"cannot mmap anonymous memory: %s\n",
rtld_strerror(errno));
#endif
+ pagepool_start = pagepool_end = NULL;
return (0);
}
+ pagepool_start = addr;
pagepool_end = pagepool_start + n * pagesz;
pagepool_start += offset;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 6:14 AM (18 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36004949
Default Alt Text
D32514.id97086.diff (882 B)
Attached To
Mode
D32514: rtld_malloc: more accurate handling of mmap(2) failure
Attached
Detach File
Event Timeline
Log In to Comment