Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157421659
D22634.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
890 B
Referenced Files
None
Subscribers
None
D22634.diff
View Options
Index: head/libexec/rtld-elf/map_object.c
===================================================================
--- head/libexec/rtld-elf/map_object.c
+++ head/libexec/rtld-elf/map_object.c
@@ -228,11 +228,12 @@
data_addr = mapbase + (data_vaddr - base_vaddr);
data_prot = convert_prot(segs[i]->p_flags);
data_flags = convert_flags(segs[i]->p_flags) | MAP_FIXED;
- if (mmap(data_addr, data_vlimit - data_vaddr, data_prot,
- data_flags | MAP_PREFAULT_READ, fd, data_offset) == (caddr_t) -1) {
- _rtld_error("%s: mmap of data failed: %s", path,
- rtld_strerror(errno));
- goto error1;
+ if (data_vlimit != data_vaddr &&
+ mmap(data_addr, data_vlimit - data_vaddr, data_prot,
+ data_flags | MAP_PREFAULT_READ, fd, data_offset) == MAP_FAILED) {
+ _rtld_error("%s: mmap of data failed: %s", path,
+ rtld_strerror(errno));
+ goto error1;
}
/* Do BSS setup */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 22, 6:24 AM (45 m, 26 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33415891
Default Alt Text
D22634.diff (890 B)
Attached To
Mode
D22634: rtld: do not try to mmap a zero-sized PT_LOAD
Attached
Detach File
Event Timeline
Log In to Comment