diff --git a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/linux_dumper.cc b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/linux_dumper.cc index ef055833977a..13918fc59e5a 100644 --- a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/linux_dumper.cc +++ b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/linux_dumper.cc @@ -593,11 +593,18 @@ bool LinuxDumper::EnumerateMappings() { bool exec = (*(i2 + 3) == 'x'); const char* i3 = my_read_hex_ptr(&offset, i2 + 6 /* skip ' rwxp ' */); if (*i3 == ' ') { - const char* name = NULL; + const char* name = my_strchr(line, '/'); + const char* label = my_strchr(line, '['); + + // Anonymous mappings may sometimes contain path-like names so we + // have to explicitly tell them apart. + if ((name != NULL) && (label != NULL)) { + name = NULL; + } + // Only copy name if the name is a valid path name, or if // it's the VDSO image. - if (((name = my_strchr(line, '/')) == NULL) && - linux_gate_loc && + if ((name == NULL) && linux_gate_loc && reinterpret_cast(start_addr) == linux_gate_loc) { name = kLinuxGateLibraryName; offset = 0;