Skip to content
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

Undefined behavior in reinterpret_casts #229

Closed
wintersteiger opened this issue Oct 3, 2015 · 4 comments
Closed

Undefined behavior in reinterpret_casts #229

wintersteiger opened this issue Oct 3, 2015 · 4 comments
Assignees
Labels

Comments

@wintersteiger
Copy link
Contributor

From #24: Undefined behavior in reinterpret_cast's, one example is this, but there are more:

uint64 r = (RAW(s.value) & 0x800FFFFFFFFFFFFFull) | ((exp + 1023) << 52);

@nunoplopes
Copy link
Collaborator

I fixed a bunch of these a while back, but I think the merge of the FPA branch undid a few changes. The fix is to use memcpy.

@wintersteiger
Copy link
Contributor Author

That may well be the case, thanks for the info!

@wintersteiger wintersteiger self-assigned this Oct 3, 2015
@wintersteiger
Copy link
Contributor Author

I fixed those in hwf and mpfx, but I didn't touch src/muz/rel/dl_instruction.cpp so as not to break something important. @NikolajBjorner could you take a look at those?

NikolajBjorner added a commit that referenced this issue Oct 4, 2015
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
wintersteiger pushed a commit to wintersteiger/z3 that referenced this issue Oct 5, 2015
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
@NikolajBjorner
Copy link
Contributor

I believe this can be closed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants