Created attachment 613047 [details] [diff] [review] v0: fixup an oversite If we set the trace location, but then don't call mark (for example because !v->isMarkable()), then the location won't be unset and will be wrong for the next mark function we call.
Created attachment 613049 [details] [diff] [review] v1: forgot to qref Sorry about that!
Comment on attachment 613049 [details] [diff] [review] v1: forgot to qref Actually, it seems that this doesn't make much sense for the nested call from MapObject::mark to MarkValueUnbarriered -- in this case we clobber the real address with the stack address. I'm going to give this some thought over the weekend and try to solve this correctly.
Created attachment 614239 [details] [diff] [review] v2: Proven working with the verifier. Had to broaden the condition allowing us to set realLocation. It now allows only the outermost call and the reset call after it is used. Unfortunately, it is still pretty subtle to use correctly: e.g. if you are going to mark a Value, you need to check if it isMarkable before calling JS_SET_TRACING_LOCATION because we only clear after marking currently. We could add an unconditional reset at the end of MarkValueInternal and MarkIdInternal, but this data flow is rapidly turning into spaghetti.
This was a lot simpler than I was making it. Added the trivial fix to: https://hg.mozilla.org/integration/mozilla-inbound/rev/0cd6ed757687 since it was needed there.