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

fixed NumberFormatException when core 63 was used in -Daffinity.reserved #86

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

m-anthony
Copy link
Contributor

The fix for using -Daffinity.reserved with more than 64 core (#68) has an issue : to compute the bitset representing that mask, it uses under the hood Long.parseLong(substring, 16) where substring is at most 16 hexadecimal digits. Unfortunately, if the highest bit is set (so if core 63 is selected in the mask), it will cause a NumberFormatException because there is an overflow (because Java types are all signed).

This PR fixes that by splitting the parsing into 2 ints and combining them into a long

@JerryShea
Copy link
Contributor

Thanks @m-anthony - could I suggest you add a test that would have failed with the old behaviour?

@JerryShea JerryShea changed the base branch from ea to develop June 21, 2023 05:34
@JerryShea
Copy link
Contributor

Hi @m-anthony this sounds useful. Could you add a test that would have failed with the old behaviour?

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.

3 participants