Skip to content

Fix size computation in nativeint_deserialize on MSVC64.#1684

Merged
dra27 merged 1 commit intoocaml:trunkfrom
stedolan:nativeint-deserialize-size
Apr 2, 2018
Merged

Fix size computation in nativeint_deserialize on MSVC64.#1684
dra27 merged 1 commit intoocaml:trunkfrom
stedolan:nativeint-deserialize-size

Conversation

@stedolan
Copy link
Copy Markdown
Contributor

@stedolan stedolan commented Mar 29, 2018

On MSVC64, sizeof(long) is 4, despite 8-byte words. Use sizeof(intnat) for the word size.

I don't think this bug can cause any actual failures, though. The marshalling code rounds sizes up to the word size, so this issue doesn't cause problems apart from breaking the build in #1683 (which adds more error checking).

@nojb
Copy link
Copy Markdown
Contributor

nojb commented Mar 29, 2018

Do you understand why exactly input_value fails in the CI after this change? Also, why is a bootstrap needed?

On MSVC64, sizeof(long) is 32. Use sizeof(intnat) for the word size.
@stedolan stedolan force-pushed the nativeint-deserialize-size branch from 630bf25 to a8752fe Compare March 29, 2018 15:36
@stedolan
Copy link
Copy Markdown
Contributor Author

Do you understand why exactly input_value fails in the CI after this change? Also, why is a bootstrap needed?

I accidentally committed a bootstrap from #1683, which changes the marshal format. Fixed now.

Copy link
Copy Markdown
Contributor

@nojb nojb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems clearly correct to me.

@dra27 dra27 merged commit db6891f into ocaml:trunk Apr 2, 2018
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants