Commit Graph
12 Commits
Author SHA1 Message Date
xiaozhou233 59e705510e BugFix: restore ReflectiveDLLInjection link for libloader
- cmake: link ReflectiveDLLInjection into loader on Windows again; the platform split dropped it when jvm moved into the WIN32 branch
2026-10-18 19:18:04 +08:00
xiaozhou233 c548022068 Feat: add Linux build support scaffolding
- cmake: guard Windows-only link dir and projects (ReflectiveDLLInjection, libinject)
- agent/loader: select win32 or linux JVM headers by platform, link jvm only on Windows
- loader: glob platform/linux sources for non-Windows builds
- injector: add a Linux entry point stub selected on non-Windows
- jvm: vendor Linux jni_md.h and jawt_md.h
2026-10-18 19:12:31 +08:00
xiaozhou233 3cd28c9bcb BugFix: keep libloader exception-free so a bad config cannot crash the JVM
- loader: libloader is reflectively loaded, so its unwind tables are never registered with the OS and a C++ exception thrown inside it cannot be caught - it crashed the target JVM with EXCEPTION_ILLEGAL_INSTRUCTION when config.toml was missing a required key. Replace the throwing config reads with contains() + get(key, default) + early return, and drop the ineffective try/catch in entrypoint()

- config: parse config.toml without exceptions (toml++ parse_result) and remove the throwing get()/getPath()/getArray() overloads

- build: compile libloader with -fno-exceptions (+ SPDLOG_NO_EXCEPTIONS) so exception-capable code fails the build instead of crashing at runtime
2026-10-16 12:59:26 +08:00
xiaozhou233 b34377d447 Refactor: restructure libloader and drop config parsing
- Move loader logic to core/ and rename plantform/ to platform/
- Remove config.toml parsing from loader; pass runtime_dir to Bootstrap directly
- Rewrite JvmAttach: RAII detach, drop dead thread_local, merge acquire helpers
- Fix initialize() missing namespace qualification
- Make GLOB sources pick up new files with CONFIGURE_DEPENDS
2026-08-16 18:53:31 +08:00
xiaozhou233 ce08b19170 Feat: add Config/Utils headers and Loader module, wire entrypoint into DllMain 2026-08-15 12:26:12 +08:00
xiaozhou233 5023ecf90c Feat: add reflective DLL injection library, JVM headers and libinject JNI module 2026-08-15 11:37:15 +08:00
xiaozhou233 01f966c5f2 Refactor: add spdlog vendored headers, Logger wrapper and libloader module skeleton 2026-08-15 11:20:36 +08:00
xiaozhou233 fe64308942 DELETE: all code 2026-08-15 10:23:15 +08:00
xiaozhou233 1dcad52e15 Revert "Perf & Fix: reduce ClassFileLoadHook overhead and fix retransform patch path"
This reverts commit bb5b215a33.
2026-08-14 23:09:40 +08:00
xiaozhou233 bb5b215a33 Perf & Fix: reduce ClassFileLoadHook overhead and fix retransform patch path
- Skip mutable event dispatch when no mutable listeners exist (hot path)
- Wire retransformClass bytecode into pendingRetransform so patches are applied
- Guard pendingRetransform with its mutex; check jvmti Allocate result
- Store global refs in captured ClassFileData and release on re-capture
- Add null/exception checks in defineClass/getLoadedClasses
- Extract shared find_class_by_internal_name helper
- Use CONFIGURE_DEPENDS for CMake globs; guard InitLogger; delete leaked jArgs
2026-08-14 17:07:36 +08:00
xiaozhou233 2ce6a8e192 [Refactor] Modify the loader structure 2026-03-01 12:50:33 +08:00
xiaozhou233 d8bed79f84 [Refactor] Rename 2026-03-01 12:38:12 +08:00