Skip to content

Commit

Permalink
Also scan lib/ and ext/ .jars with ClassGraph
Browse files Browse the repository at this point in the history
At least for JDK/JRE 8, these directories contain `.jar` files with
classes that may need to be instrumented.
  • Loading branch information
fmeum committed Oct 17, 2023
1 parent 13e38f8 commit f7178ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class RuntimeInstrumentor(
val className = internalClassName.replace('/', '.')
val classfileBuffer = maybeClassfileBuffer ?: ClassGraph()
.enableSystemJarsAndModules()
.acceptLibOrExtJars()
.ignoreClassVisibility()
.acceptClasses(className)
.scan()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ data class Hooks(
return ClassGraph()
.enableClassInfo()
.enableSystemJarsAndModules()
.acceptLibOrExtJars()
.rejectPackages("jaz.*", "com.code_intelligence.jazzer.*")
.scan()
.use { scanResult ->
Expand Down

0 comments on commit f7178ef

Please sign in to comment.