The first assertion, in CallFrame::setLocationAsBytecodeOffset(), wrongly assumes that the incoming offset argument is in units of bytes. This is not true. It is in units of Instruction*. Hence, the assertion which checks for the low 2 bits to be clear can fail. The fix is to remove the assertion.
Created attachment 204095 [details] the patch.
Comment on attachment 204095 [details] the patch. Can we have an enum type so distinguish whether an offset should be bytes or instructions? e.g. enum InstructionOffset {}; enum ByteOffset {}; ByteOffset byteOffsetFromInstruction(unsigned i) { return i * sizeof Instruction } , etc
<rdar://problem/14100876>
(In reply to comment #2) > (From update of attachment 204095 [details]) > Can we have an enum type so distinguish whether an offset should be bytes or instructions? > > e.g. enum InstructionOffset {}; enum ByteOffset {}; ByteOffset byteOffsetFromInstruction(unsigned i) { return i * sizeof Instruction } , etc I'm not sure that will work. My gut feeling is that it will result in a lot of casting, which would defeat the type safety checks (which is why I think you want the enums, right?). Thanks for the review. Patch landed in r151347: <http://trac.webkit.org>.
(In reply to comment #4) > Patch landed in r151347: <http://trac.webkit.org>. Landed in r151347: <http://trac.webkit.org/changeset/151347>.