summaryrefslogtreecommitdiff
path: root/rts/Printer.c
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2016-06-10 06:20:00 -0400
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2016-06-10 06:20:00 -0400
commitb0a76643e979a2e5198875a9c99f5f625f318668 (patch)
tree694a58db8afd4df1dc6931bec82a49936458dd32 /rts/Printer.c
parente9dfb6e51f0cd585611a742ce7167e307ee7e7e8 (diff)
downloadhaskell-b0a76643e979a2e5198875a9c99f5f625f318668.tar.gz
prettyPrintClosure(): Untag the closure before accessing fields
(This fixes segfaults)
Diffstat (limited to 'rts/Printer.c')
-rw-r--r--rts/Printer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/Printer.c b/rts/Printer.c
index c33e341d6f..a6f26c2262 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -805,6 +805,8 @@ void prettyPrintClosure_ (const StgClosure *obj)
{
const StgInfoTable *info;
+ obj = UNTAG_CONST_CLOSURE(obj);
+
/* collapse any indirections */
unsigned int type;
type = get_itbl(obj)->type;