Page offset alignment #1

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@gwynne

gwynne commented Jan 19, 2014

If the trampoline implementation isn't aligned to 16 bytes, things start to crash.

@landonf

This comment has been minimized.

Show comment Hide comment
@landonf

landonf Jan 20, 2014

Owner

Admittedly I haven't swapped in my full memory of the subject, but IIRC my intention was to do this individually in the trampoline prefixes themselves:

https://github.com/landonf/plblockimp/blob/master/Source/x86_64/blockimp_x86_64.tramp#L62.
https://github.com/landonf/plblockimp/blob/master/Source/x86_32/blockimp_x86_32.tramp#L65

Thoughts?

Owner

landonf commented Jan 20, 2014

Admittedly I haven't swapped in my full memory of the subject, but IIRC my intention was to do this individually in the trampoline prefixes themselves:

https://github.com/landonf/plblockimp/blob/master/Source/x86_64/blockimp_x86_64.tramp#L62.
https://github.com/landonf/plblockimp/blob/master/Source/x86_32/blockimp_x86_32.tramp#L65

Thoughts?

@gwynne

This comment has been minimized.

Show comment Hide comment
@gwynne

gwynne Jan 20, 2014

To quote Robert Picardo, that may have been your intention, but it certainly wasn't the result. Or at least, it doesn't look like it was. All I know is that aligning the page offset stopped me from crashing hard on x86_64 any time a trampoline was called. Xcode 5.0.2, Mavericks SDK, both -O0 and -O2 same issue.

gwynne commented Jan 20, 2014

To quote Robert Picardo, that may have been your intention, but it certainly wasn't the result. Or at least, it doesn't look like it was. All I know is that aligning the page offset stopped me from crashing hard on x86_64 any time a trampoline was called. Xcode 5.0.2, Mavericks SDK, both -O0 and -O2 same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment