diff options
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 |
commit | b0a76643e979a2e5198875a9c99f5f625f318668 (patch) | |
tree | 694a58db8afd4df1dc6931bec82a49936458dd32 | |
parent | e9dfb6e51f0cd585611a742ce7167e307ee7e7e8 (diff) | |
download | haskell-b0a76643e979a2e5198875a9c99f5f625f318668.tar.gz |
prettyPrintClosure(): Untag the closure before accessing fields
(This fixes segfaults)
-rw-r--r-- | rts/Printer.c | 2 |
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; |