Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ispras/casr/llms.txt
Use this file to discover all available pages before exploring further.
casr-java analyzes Java crash output — unhandled exceptions, thread dumps, and Jazzer-emitted == Java Exception: blocks — and produces structured .casrep reports. It integrates with Jazzer, the coverage-guided Java fuzzer from Code Intelligence, and is used automatically by casr-libfuzzer when a Java target is detected.
The tool captures exception class, message, and full stack trace from stderr. When Java source directories are provided, it walks those directories to locate the matching .java source file and embeds the crash-site source snippet in the report.
Synopsis
-- separator is required. Everything after it is the command CASR will execute and capture output from (typically java or jazzer).
Options
Path to save the
.casrep report file. If a directory is provided, the report filename is generated automatically from the crash context.Print the CASR report as JSON to stdout instead of writing it to a file. Mutually exclusive with
--output; exactly one of the two is required.Path to a file that will be fed to the target program’s standard input.
One or more directories to search recursively for
.java source files. When a stack frame references MyClass.java, CASR walks these directories to find the file and embed the source snippet at the crash line. Multiple directories can be provided as separate arguments on the command line, or as a colon-separated string via the CASR_SOURCE_DIRS environment variable.Maximum number of seconds to wait for the target process to finish. A value of
0 disables the timeout entirely.Path to a file containing regular expressions for function names and file paths that should be excluded from stack trace analysis.
A path prefix removed from every file path in the stack trace and crash line. Also settable via
CASR_STRIP_PATH.Shared library paths injected via
LD_PRELOAD into the target process only. Space or colon delimited. Also settable via CASR_PRELOAD.CASR_SOURCE_DIRS environment variable
Instead of passing--source-dirs on every invocation, export the variable with a colon-separated list of paths:
casr-libfuzzer for bulk triage, where the source dirs flag cannot be set per-invocation in the triage command.
Examples
Analyze a plain Java file that throws an unhandled exception:Fuzzer integration
casr-java handles single-crash analysis. For bulk triage of Jazzer crash directories, use casr-libfuzzer, which auto-detects Java targets and invokes casr-java for each crash input.
If the exception is absent from stderr but sanitizer output is present,
casr-java automatically delegates to casr-san so ASAN-level severity analysis is applied. This covers Jazzer runs that instrument both Java code and native JNI libraries.