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

Fix various bugs in signed integers related to sign-extension #49

Merged
merged 5 commits into from
Oct 27, 2020

Conversation

rixed
Copy link
Contributor

@rixed rixed commented Oct 6, 2020

Namely, mul was losing the sign and right shifts were inverted.
See accompanying tests.

@rixed
Copy link
Contributor Author

rixed commented Oct 17, 2020

ping?

@rgrinberg rgrinberg merged commit b280abd into andrenth:master Oct 27, 2020
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Oct 28, 2020
CHANGES:

## Fixes:

* Correct conversion from uint24 to other ints (andrenth/ocaml-stdint#39, @rixed)
* Fix conversion from all ints to uint24 and int24 (andrenth/ocaml-stdint#41, @rixed)
* Fix int24 failing to recover from casts (andrenth/ocaml-stdint#43, @rixed)
* Fix sign extensions (andrenth/ocaml-stdint#49, @rixed)
* `Long_val` returns `intnat`, previously `long` was used (andrenth/ocaml-stdint#53, @dra27)
* Reduce size of marshalled custom values on 4.08+ (andrenth/ocaml-stdint#54, @dra27)
* Store 128-bit ints as structs to prevent unaligned access (andrenth/ocaml-stdint#55, @dra27)

## New features:

* Add `of_substring` (andrenth/ocaml-stdint#49, @darlentar)
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Oct 28, 2020
CHANGES:

## Fixes:

* Correct conversion from uint24 to other ints (andrenth/ocaml-stdint#39, @rixed)
* Fix conversion from all ints to uint24 and int24 (andrenth/ocaml-stdint#41, @rixed)
* Fix int24 failing to recover from casts (andrenth/ocaml-stdint#43, @rixed)
* Fix sign extensions (andrenth/ocaml-stdint#49, @rixed)
* `Long_val` returns `intnat`, previously `long` was used (andrenth/ocaml-stdint#53, @dra27)
* Reduce size of marshalled custom values on 4.08+ (andrenth/ocaml-stdint#54, @dra27)
* Store 128-bit ints as structs to prevent unaligned access (andrenth/ocaml-stdint#55, @dra27)

## New features:

* Add `of_substring` (andrenth/ocaml-stdint#49, @darlentar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants