-
Notifications
You must be signed in to change notification settings - Fork 69
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
Use appropriate alignment constraints in LLVM memory model #338
Comments
I needed to increase the alignment of newly-allocated regions so that subsequent loads/stores would not fail. In the It's not 100% clear that this is the right thing to do, as we don't explicitly check the alignment of arguments at call sites, etc. To be really precise about this probably requires adding alignment information to the SAWScript specifications. :-/ In the meantime, perhaps a more reasonable default is to use the alignment value computed for the type of memory object being allocated? |
On further investigation, it appears that there are a couple of FIXMEs related to alignment remaining in the code.
saw-script/src/SAWScript/X86Spec.hs Line 518 in 6789b1a
saw-script/src/SAWScript/X86Spec.hs Line 873 in 6789b1a
saw-script/src/SAWScript/X86Spec.hs Line 917 in 6789b1a
saw-script/src/SAWScript/X86Spec.hs Line 944 in 6789b1a
saw-script/src/SAWScript/X86Spec.hs Line 1050 in 6789b1a
saw-script/src/SAWScript/X86Spec.hs Line 1126 in 6789b1a
We should probably leave this ticket open until we take care of each of those. |
#1539 will add a couple more uses of |
Changeset c8c1a54 adapts saw-script to a newer crucible-llvm version that has a new
Alignment
argument on various memory model operations (see GaloisInc/crucible#117). Currently this argument is set to0
everywhere (byte-alignment, the minimum) but it would be better to use more alignment whenever possible.(See also GaloisInc/macaw#20.)
The text was updated successfully, but these errors were encountered: