@@ -60,9 +60,12 @@ public HotspotCrashLogParser() {
6060 private static final Pattern SPACE_SPLITTER = Pattern .compile ("\\ s+" );
6161 private static final Pattern NEWLINE_SPLITTER = Pattern .compile ("\n " );
6262 private static final Pattern SIGNAL_PARSER = Pattern .compile ("\\ s*(\\ w+) \\ ((\\ w+)\\ ).*" );
63+ // Groups: 1=si_signo, 2=signal name, 3=si_code, 4=si_code name,
64+ // 5=si_addr (null for SI_USER), 6=si_pid (null for si_addr), 7=si_uid (null for si_addr)
6365 private static final Pattern SIGINFO_PARSER =
6466 Pattern .compile (
65- "siginfo:\\ s+si_signo:\\ s+(\\ d+)\\ s+\\ ((\\ w+)\\ ),\\ s+si_code:\\ s+(\\ d+)\\ s+\\ (([^)]+)\\ ),\\ s+si_addr:\\ s+(0x[0-9a-fA-F]+)" );
67+ "siginfo:\\ s+si_signo:\\ s+(\\ d+)\\ s+\\ ((\\ w+)\\ ),\\ s+si_code:\\ s+(\\ d+)\\ s+\\ (([^)]+)\\ ),\\ s+"
68+ + "(?:si_addr:\\ s+(0x[0-9a-fA-F]+)|si_pid:\\ s+(\\ d+),\\ s+si_uid:\\ s+(\\ d+))" );
6669 private static final Pattern DYNAMIC_LIBS_PATH_PARSER =
6770 Pattern .compile ("^(?:0x)?[0-9a-fA-F]+(?:-[0-9a-fA-F]+)?\\ s+(?:[^\\ s/\\ []+\\ s+)*(.*)$" );
6871
@@ -275,16 +278,18 @@ public CrashLog parse(String uuid, String crashLog) {
275278 break ;
276279 case STACKTRACE :
277280 if (line .startsWith ("siginfo:" )) {
278- // siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr:
279- // 0x0000000000000070
281+ // siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x70
282+ // siginfo: si_signo: 11 (SIGSEGV), si_code: 0 (SI_USER), si_pid: 554848, si_uid: 1000
280283 final Matcher siginfoMatcher = SIGINFO_PARSER .matcher (line );
281284 if (siginfoMatcher .matches ()) {
282285 Integer number = safelyParseInt (siginfoMatcher .group (1 ));
283286 String name = siginfoMatcher .group (2 );
284287 Integer siCode = safelyParseInt (siginfoMatcher .group (3 ));
285288 String sigAction = siginfoMatcher .group (4 );
286289 String address = siginfoMatcher .group (5 );
287- sigInfo = new SigInfo (number , name , siCode , sigAction , address );
290+ Integer siPid = safelyParseInt (siginfoMatcher .group (6 ));
291+ Integer siUid = safelyParseInt (siginfoMatcher .group (7 ));
292+ sigInfo = new SigInfo (number , name , siCode , sigAction , address , siPid , siUid );
288293 }
289294 } else if (line .contains ("P R O C E S S" )) {
290295 state = State .SEEK_DYNAMIC_LIBRARIES ;
0 commit comments