soot-oss / SootUp

A new version of Soot with a completely overhauled architecture
https://soot-oss.github.io/SootUp/
GNU Lesser General Public License v2.1
546 stars 66 forks source link

Fix Type.getValueBitSize in case of a CharType #943

Closed marcus-h closed 1 month ago

marcus-h commented 1 month ago

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 commented 1 month ago

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