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

About intercept java.lang.Thread #1727

Open
i36lib opened this issue Nov 18, 2024 · 1 comment
Open

About intercept java.lang.Thread #1727

i36lib opened this issue Nov 18, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@i36lib
Copy link

i36lib commented Nov 18, 2024

Hi raphw,
Since the java.lang.Thread is loaded before premain, it seems there is no way to intercept java.lang.Thread:start() via method delegation instead of asm visitor annotation (e.g. @Advice.OnMethodEnter), is that right ?

@raphw
Copy link
Owner

raphw commented Nov 18, 2024

Have a look at RetransformationStrategy, which allows you to transform loaded classes. Also, you likely need to disableClassFormatChanges() in doing so.

@raphw raphw self-assigned this Nov 18, 2024
@raphw raphw added the question label Nov 18, 2024
@raphw raphw added this to the 1.15.10 milestone Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants