809 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
102
views
How to use visitLocalVariable in ASM correctly?
So I am trying to add information about locals I use. The current way I am trying to achieve it - is:
methodVisitor = classWriter.visitMethod(ACC_PUBLIC | ACC_STATIC, "something", "()V&...
0
votes
1
answer
61
views
Method not found in class using ASM byte code
I have a perplexing problem. We use run-time created codec:s for message en- and decoding. The original authors has long since left the building. I've been asked to add some rather simple ...
0
votes
2
answers
77
views
How properly ThreadLocal Context in the ByteBuddy Instrumentation Advice
Hi I'm trying to build a trace agent where app agent propagates the origin application name across the multiple network calls using the HTTPUrlConnection.
So far, I was able to invoke the Advice ...
0
votes
0
answers
24
views
How to ensure instrumented class is packaged in the APK
I have this custom gradle plugin to replace the implementation of a class. When I build the apk I do see that the original class is modified as expected. However, the class packaged in the apk is ...
0
votes
0
answers
103
views
Unable to Transform with Android Gradle Plugin
I’m Trying to Intercept Some Methods Using the Byte-Buddy Android Gradle Plugin
I want to intercept some methods using the Byte-Buddy Android Gradle plugin. Here are the versions I am using:
• Java ...
0
votes
1
answer
88
views
Javabytecode generation, nested loops - Inconsistent stackmap frames at branch target 114
I am playing with Java bytecode generation (using Clojure with https://github.com/jgpc42/insn), Currently I am trying to generate a bytecode for a nested for loop, bellow is the relevant part of the ...
1
vote
1
answer
601
views
Starting a Spring boot project with a custom Java agent jar gives errors
As shown in the following figure, a custom Java agent package is added to the JVM options
-javaagent:/usr/local/maven/apache-maven-3.6.3/repository/com/graviton/Probe-Agent/1.0-SNAPSHOT/Probe-Agent-1....
-1
votes
1
answer
138
views
Java ClassFileTransformer fails to throw exception
I have code that attempts to redefine a class at runtime using a ClassFileTransformer and an instance of Instrumentation.
However, I've noticed that the transform method of ClassFileTransformer fails ...
0
votes
1
answer
124
views
Why does java agent get stuck and not perform any actions?
I am writing a term paper for the university. The task is to write two programs, one of which collects some information, signs it with a digital key, and saves the encrypted data and the key to ...
0
votes
2
answers
165
views
How to Mix Manual and Automatic Calculation of Max Locals, Max Stack, and Frames in ASM per Method Basis?
I'm currently working on a project where I generate Java bytecode from my own intermediate representation using the ASM library. For some methods in my code, I already have pre-calculated values for ...
-1
votes
1
answer
100
views
ASM does not preserve order in the constant pool table
It seems that ASM ClassWriter does not preserve the order of entries in the constant pool. For example, consider the following code snippet:
@Test
void hashShouldBeSame() throws IOException, ...
-1
votes
1
answer
289
views
Java ASM edit class/method that is aleready loaded by JVM
I'm currently trying to edit the bytecode of a java class after it has been loaded by the JVM.
I use Java 8 and ASM 5.0.3.
I can't change the command line or the JVM arguments.
Here is a minimal ...
0
votes
2
answers
203
views
How can I modify the core api in java ?
for example:I want to change LocalDateTime.now() return result in non-production enviroment,
I am trying to invoke the following code,but error occors:
@Test
public void test3() {
...
1
vote
2
answers
125
views
With a java ASM agent, how to detect a collection modification in a object?
I'am working in a Transparent Dirty Detection Agent (tdd-agent). It work really well redefining the target classes to implement the setDirty()/isDirty() and set it when it detect a putfield, but I ...
1
vote
1
answer
202
views
How can I make org.objectweb.asm.util.CheckClassAdapter throw an exception instead of printing errors to stderr?
I am currently utilizing org.objectweb.asm.util.CheckClassAdapter for bytecode verification in my Java project. However, I've observed that this class prints errors to stderr instead of throwing ...