Repository navigation
BUILD-15895: Always disable Base64 intrinsics for the Maven scanner - #397
Conversation
Callers that set scanner-java-opts replace the default, so the workaround has to be appended after the input.
This comment has been minimized.
This comment has been minimized.
julien-carsique-sonarsource
left a comment
There was a problem hiding this comment.
Does the JDK option works with all architectures?
Yes. -XX:-UseBASE64Intrinsics is valid on both x86-64 and ARM for Java 11 and newer, which is what the Maven scanner runs. On ARM, and on older x86 CPUs without AVX-512 VBMI, the flag does nothing harmful: those machines are not affected, and HotSpot just keeps the ordinary Base64 decoder. |
The single quotes were redundant, and the README input table needs the same note as the action.
|
Yes.
|
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsAppending -XX:-UseBASE64Intrinsics changes Maven scanner JVM behavior and could reduce Base64-processing performance during analysis. Always appends ✅ 1 closed✅ Quality: README scanner-java-opts entry omits the always-appended flag
Verification Rules 3/3 met Repos 12 inspected · PRs 1 inspectedFunctional validation No results Rules 3 passed 3 not applicable
Broader impact Repos 12 inspected PRs 1 inspectedCross-repo 12 repositories inspected 0 open impacts
7 more repositories Cross-PR 1 PR inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Summary
-XX:-UseBASE64IntrinsicstoSONAR_SCANNER_JAVA_OPTSafterscanner-java-opts, so a caller-supplied-Xmxdoes not drop the workaround.Test plan
scanner-java-optsat the default still runs the scanner with-Xmx512m -XX:-UseBASE64Intrinsicsscanner-java-opts(for example-Xmx30g) still receives that value plus-XX:-UseBASE64Intrinsics