Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,7 @@ public CrashLog parse(String uuid, String crashLog) {
final Matcher m = REGISTER_TO_MEMORY_MAPPING_PARSER.matcher(line);
if (m.lookingAt()) {
currentRegisterToMemoryMapping = m.group(1);
registerToMemoryMapping.put(
currentRegisterToMemoryMapping, line.substring(line.indexOf('=') + 1));
registerToMemoryMapping.put(currentRegisterToMemoryMapping, line.substring(m.end()));
} else if (!currentRegisterToMemoryMapping.isEmpty()) {
registerToMemoryMapping.computeIfPresent(
currentRegisterToMemoryMapping, (key, value) -> value + "\n" + line);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public final class RedactUtils {
// "Compiled method (c2) ... com.company.Foo::methodName (N bytes)" (PRODUCT — dots)
// "Compiled method (c2) ... com/company/Foo::methodName (N bytes)" (debug — slashes)
private static final Pattern NMETHOD_CLASS =
Pattern.compile("([A-Za-z][A-Za-z0-9$]*(?:[./][A-Za-z][A-Za-z0-9$]*)+)::");
Pattern.compile("([A-Za-z$_][A-Za-z0-9$_]*(?:[./][A-Za-z$_][A-Za-z0-9$_]*)+)::");

// Library path in two formats produced by os::print_location():
// <offset 0x...> in /path/to/lib.so at 0x... (no dladdr symbol)
Expand All @@ -62,11 +62,11 @@ public final class RedactUtils {
// This specifically identifies the inline string value of a java.lang.Class 'name' field
private static final Pattern DOTTED_CLASS_OOP_REF =
Pattern.compile(
"\"([A-Za-z][A-Za-z0-9$]*(?:\\.[A-Za-z][A-Za-z0-9$]*)*)\"(\\{0x[0-9a-fA-F]+\\})");
"\"([A-Za-z$_][A-Za-z0-9$_]*(?:\\.[A-Za-z$_][A-Za-z0-9$_]*)*)\"(\\{0x[0-9a-fA-F]+\\})");

// is an oop: com.company.Class
private static final Pattern IS_AN_OOP =
Pattern.compile("(is an oop: )([A-Za-z][A-Za-z0-9$]*(?:\\.[A-Za-z][A-Za-z0-9$]*)*)");
Pattern.compile("(is an oop: )([A-Za-z$_][A-Za-z0-9$_]*(?:\\.[A-Za-z$_][A-Za-z0-9$_]*)*)");

// Hex-dump bytes in "points into unknown readable memory:" lines.
// Two formats produced by os::print_location():
Expand Down Expand Up @@ -215,6 +215,7 @@ static String redactNmethodClass(String line) {
* java.lang.Class} oop) use {@link #redactRegisterToMemoryMapping} which detects the oop type
* automatically.
*/
// @VisibleForTesting — no production callers; used directly in unit tests
static String redactDottedClassOopRef(String line) {
return redactStringOopRef(line, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* documentation for details.
*/
public final class CrashTrackingConfig {
private CrashTrackingConfig() {}

public static final String CRASH_TRACKING_ENABLED = "crashtracking.enabled";
public static final boolean CRASH_TRACKING_ENABLED_DEFAULT = true;

Expand Down
Loading