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

String created through java makeConcat not reported #44

Open
glukasiknuro opened this issue Feb 23, 2022 · 0 comments
Open

String created through java makeConcat not reported #44

glukasiknuro opened this issue Feb 23, 2022 · 0 comments

Comments

@glukasiknuro
Copy link

glukasiknuro commented Feb 23, 2022

Based on findings from bazelbuild/bazel#14890 (comment) looks like some string concatenations are not reported.

makeConcat was introduced in java 9 - see https://openjdk.java.net/jeps/280 and implementation in java 11 in
http://hg.openjdk.java.net/jdk/jdk11/file/jdk-11+28/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java#l1483

Possibly UNSAFE.allocateUninitializedArray calls done from
http://hg.openjdk.java.net/jdk/jdk11/file/jdk-11+28/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java#l1633 could be instrumented - but not sure how it will play with JVM machinery.

Current workaround seems to be -Djava.lang.invoke.stringConcat=MH_SB_SIZED that forces to use concat implementation that instrumenter is able to catch.

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

No branches or pull requests

1 participant