Closed Bug 466529 Opened 16 years ago Closed 16 years ago

[redux] Win64 _setjmpex requires 16-byte aligned jmp_buf

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: lhansen, Assigned: lhansen)

References

Details

Attachments

(1 file)

But mmgc only guarantees 8-byte alignment, so when a jmp_buf is allocated inside heap storage, we sometimes crash inside _setjmpex.

The most expedient way to work around this is to allocate a little slop on Win64 and adjust the pointer if necessary, but this may be an mmgc bug or a _setjmpex problem, depending on one's point of view.
Ed says, "i don't think anyone has previously posed that 16byte alignment be a requirement for MMgc on x64."
Attached patch PatchSplinter Review
Regarding the verbose style, I tried placing the "+ 8" in an #ifdef by itself, but Visual C++ could not parse it, it looks like it performs integrated parsing and preprocessing and got confused.

With this patch, the mops tests on win64 reliably fail in the way they've been failing in the buildbot (where presumably we've been luckier with the alignment) - with three failures.
Attachment #349829 - Flags: review?(edwsmith)
Not sure I understand how the patch relates to comment #1; does it solve the issue?
It solves the crasher I was seeing in debug builds, but allocations are still 8-byte aligned on 64-bit systems.  I interpret Ed's comment as "Until such a time when somebody else runs into a problem requiring 16-byte alignment, 8-byte is what we require".  So the patch works around the problem for the specific problem of the jmp_buf.
Attachment #349829 - Flags: review?(edwsmith) → review+
pushed to tamarin-redux as changeset 1152:4b885fb29c85
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Resolved fixed engineering / work item that has been pushed.  Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: