summaryrefslogtreecommitdiff
path: root/rts/linker
diff options
context:
space:
mode:
authorPhuong Trinh <lolotp@fb.com>2019-04-25 18:44:02 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-13 02:48:50 -0400
commitfc6b23be509e290f8d27775a1c637284a335ed81 (patch)
treee977d63250a03296011b58434034cb2c471bf43f /rts/linker
parent5ffc266e9c5ec8ed6010835165a65bd1f6b56dd4 (diff)
downloadhaskell-fc6b23be509e290f8d27775a1c637284a335ed81.tar.gz
Fix #16525: ObjectCode freed wrongly because of lack of info header check
`checkUnload` currently doesn't check the info header of static objects. Thus, it may free an `ObjectCode` struct wrongly even if there's still a live static object whose info header lies in a mapped section of that `ObjectCode`. This fixes the issue by adding an appropriate check.
Diffstat (limited to 'rts/linker')
-rw-r--r--rts/linker/M32Alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c
index 52b182e54d..33c4335286 100644
--- a/rts/linker/M32Alloc.c
+++ b/rts/linker/M32Alloc.c
@@ -24,7 +24,7 @@ Note [Compile Time Trickery]
This file implements two versions of each of the `m32_*` functions. At the top
of the file there is the real implementation (compiled in when
`RTS_LINKER_USE_MMAP` is true) and a dummy implementation that exists only to
-satisfy the compiler and which hould never be called. If any of these dummy
+satisfy the compiler and which should never be called. If any of these dummy
implementations are called the program will abort.
The rationale for this is to allow the calling code to be written without using