Commit 60a3f11f authored by David Feuer's avatar David Feuer Committed by David Feuer

Fix pointer tagging mistake

f9c6d53f led to #14036. The
problem turned out to be rather simple: the `obj` pointer was
being tagged using `obj + arity`. Because this is C, that's done
with *pointer arithmetic*, which is not at all what we want. Add
appropriate casts.

Reviewers: austin, bgamari, erikd, simonmar

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14036

Differential Revision:
parent 4ec4ca99
......@@ -429,7 +429,9 @@ eval_obj:
tagged_obj =
arity <= TAG_MASK ? obj + arity : obj,
arity <= TAG_MASK
? (StgClosure *) ((intptr_t) obj + arity)
: obj,
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment