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 Type.getValueBitSize in case of a CharType #943

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

marcus-h
Copy link

@marcus-h marcus-h commented Jun 5, 2024

According to jls-4.2 [1], the value bit size of a char is 16 bit. The old code
returned 32 bit.

Note that the added TypeTest is not executed by default, when running
"mvn test". Since other tests are also affected, I assume this is the
intended behavior.

[1] https://docs.oracle.com/javase/specs/jls/se22/html/jls-4.html#jls-4.2

Copy link
Collaborator

@swissiety swissiety left a comment

Choose a reason for hiding this comment

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

👍 nice finding

According to jls-4.2 [1], the value bit size of a char is 16 bit. The old
code returned 32 bit.

Note that the added TypeTest is not executed by default, when running
"mvn test". Since other tests are also affected, I assume this is the
intended behavior.

[1] https://docs.oracle.com/javase/specs/jls/se22/html/jls-4.html#jls-4.2
@marcus-h marcus-h force-pushed the fix-char-value-bit-size branch from e030202 to 16efca9 Compare June 5, 2024 18:15
@marcus-h
Copy link
Author

marcus-h commented Jun 5, 2024

I just did a forced push to my branch in order to pacify the style checker.

@swissiety swissiety merged commit 9a92cf9 into soot-oss:develop Jun 6, 2024
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