Export of internal Abseil changes

--
399d051d30f7a78c367bb1dc08829ffacbb619a6 by Abseil Team <absl-team@google.com>:

Fix a glitch in symbolization which could result in the same address being
correctly symbolized and "(unknown)" in the same crash report.

PiperOrigin-RevId: 435371003
Change-Id: I9f6a5684144be6d3d366584601d79fda9eefdce6

--
5dad813de52773e0bb09c6b2351e1bbadb53deac by Abseil Team <absl-team@google.com>:

Fix ABSL_HAVE_MMAP check in direct_mmap.h

This change makes the check for ABSL_HAVE_MMAP match the other checks
in absl. This fixes builds where ABSL_HAVE_MMAP is not defined.

PiperOrigin-RevId: 435190242
Change-Id: I11638ef315849cafcf4ea1611eee1a98c80e7dcb
GitOrigin-RevId: 399d051d30f7a78c367bb1dc08829ffacbb619a6
pull/1137/head
Abseil Team 3 years ago committed by Andy Getz
parent e6ae2641f6
commit 9f5b2c782a
  1. 2
      absl/base/internal/direct_mmap.h
  2. 3
      absl/debugging/internal/examine_stack.cc

@ -20,7 +20,7 @@
#include "absl/base/config.h"
#if ABSL_HAVE_MMAP
#ifdef ABSL_HAVE_MMAP
#include <sys/mman.h>

@ -146,7 +146,8 @@ static void DumpPCAndFrameSizeAndSymbol(void (*writerfn)(const char*, void*),
const char* const prefix) {
char tmp[1024];
const char* symbol = "(unknown)";
if (absl::Symbolize(symbolize_pc, tmp, sizeof(tmp))) {
if (absl::Symbolize(symbolize_pc, tmp, sizeof(tmp)) ||
(pc != symbolize_pc && absl::Symbolize(pc, tmp, sizeof(tmp)))) {
symbol = tmp;
}
char buf[1024];

Loading…
Cancel
Save