New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmpxchg16b instruction needs 16byte aligned data. #1255

Merged
merged 1 commit into from Sep 11, 2015

Conversation

Projects
None yet
2 participants
@redstar
Contributor

redstar commented Sep 10, 2015

Starting with DMD 2.067.1, the new atomicLoad() and atomicStore() functions are used.
At the core they use cmpxchg16b instruction which needs proper aligned data.

The shared HTTPServerContext[] is not properly aligned and causes a segmentation fault
with the upcoming LDC 0.16.0.

This PR adds align(16) to align the variable.

cmpxchg16b instruction needs 16byte aligned data.
Starting with DMD 2.067.1, the new atomicLoad() and atomicStore() functions are used.
At the core they use cmpxchg16b instruction which needs proper aligned data.

The shared HTTPServerContext[] is not properly aligned and causes a segmentation fault
with the upcoming LDC 0.16.0.

This PR adds align(16) to align the variable.

redstar added a commit to redstar/ldc that referenced this pull request Sep 10, 2015

Implement 128bit atomic load, atomic store and cmpxchg.
This is required for compiling latest vibe.d version.
Please note that a fix to vibe.d is also required, see
vibe-d/vibe.d#1255

redstar added a commit to redstar/ldc that referenced this pull request Sep 10, 2015

Implement 128bit atomic load, atomic store and cmpxchg.
This is required for compiling latest vibe.d version.
Please note that a fix to vibe.d is also required, see
vibe-d/vibe.d#1255

redstar added a commit to redstar/ldc that referenced this pull request Sep 10, 2015

Implement 128bit atomic load, atomic store and cmpxchg.
This is required for compiling latest vibe.d version.
Please note that a fix to vibe.d is also required, see
vibe-d/vibe.d#1255

s-ludwig added a commit that referenced this pull request Sep 11, 2015

Merge pull request #1255 from redstar/align
cmpxchg16b instruction needs 16byte aligned data.

@s-ludwig s-ludwig merged commit 538f578 into vibe-d:master Sep 11, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment