Skip to content

Commit a0d9461

Browse files
mccullsdevflow.devflow-routing-intake
andauthored
Promote hint about avoiding static interface methods in advice to top-level (#12000)
Promote hint about avoiding static interface methods in advice to top-level Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 846103d commit a0d9461

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,9 @@ Code running in the agent's `premain` phase must **not** use:
8888
- `javax.management.*` — causes class loading issues
8989

9090
See [docs/bootstrap_design_guidelines.md](docs/bootstrap_design_guidelines.md) for details and alternatives.
91+
92+
## Advice constraints (critical)
93+
94+
Advice methods (OnMethodEnter/OnMethodExit) are inlined into the instrumented class's bytecode.
95+
Calling a static interface method there, such as Context.root() or Context.current(), can cause
96+
a VerifyError at runtime — use Java8BytecodeBridge (rootContext, currentContext, etc.) instead.

0 commit comments

Comments
 (0)