about summary refs log tree commit diff
path: root/absl/debugging/symbolize_elf.inc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-04-24T08·44-0700
committerMatt Calabrese <calabrese@x.team>2019-04-24T18·35-0400
commit33841c5c963aa9c3f096ef8e6c1e71624b941940 (patch)
tree8ddb90d308e40dfcb793d3db77759741b4e809cf /absl/debugging/symbolize_elf.inc
parentca3f87560a0eef716195cadf66dc6b938a579ec6 (diff)
Export of internal Abseil changes.
--
bb92c768e2271ddbebc1b1eb7e16a7b7c86a6e1c by Abseil Team <absl-team@google.com>:

Automated g4 rollback of changelist 244998488.

*** Reason for rollback ***

I'm seeing test failures, rolling this back.

*** Original change description ***

BEGIN_PUBLIC

The default constructor for optional<T> is filling dummy_ with zeros (see https://godbolt.org/z/IVea7X for a reduced example), which has a performance impact for large Ts. This comes from the gcc6 bugfix that made dummy as big as T. Because constexpr constructors are required to initialize all members of a struct, we cannot prevent this in a standard-compliant way as soon as dummy has any members (note that clang will happily accept adding a `constexpr dummy_type() {}` constructor...

***

PiperOrigin-RevId: 245004716

--
6e3ee35af50ffbee604c22300f3260ebc5f6cf52 by Abseil Team <absl-team@google.com>:

The default constructor for optional<T> is filling dummy_ with zeros (see https://godbolt.org/z/IVea7X for a reduced example), which has a performance impact for large Ts. This comes from the gcc6 bugfix that made dummy as big as T. Because constexpr constructors are required to initialize all members of a struct, we cannot prevent this in a standard-compliant way as soon as dummy has any members (note that clang will happily accept adding a `constexpr dummy_type() {}` constructor to dummy_type to prevent zero-initialization, but this is UB AFAICT).

This all stems from the fact that we're constructing an object by using placement new on dummy_. The solution I'm using here is to do the placement new on the actual data_. This creates a new issue in when T is volatile, because we can no longer use `&data_` to do the placement new. The solution I'm using here is to make data_ a non-const and non-volatile T, and only provide fully possibly qualified access through `reference()` accessors. I think this correctly prevents UB.

PiperOrigin-RevId: 244998488

--
4f52e64c4cf6aef8df6360007bcc53d8b00db2b4 by Abseil Team <absl-team@google.com>:

Increase SYMBOL_BUF_SIZE from 2KB to 3KB.

PiperOrigin-RevId: 244954529
GitOrigin-RevId: bb92c768e2271ddbebc1b1eb7e16a7b7c86a6e1c
Change-Id: Iaed9a027064a9ecd194c5c146169c683b77f12ef
Diffstat (limited to 'absl/debugging/symbolize_elf.inc')
-rw-r--r--absl/debugging/symbolize_elf.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/debugging/symbolize_elf.inc b/absl/debugging/symbolize_elf.inc
index 05fc297985ec..5ac7ff5de427 100644
--- a/absl/debugging/symbolize_elf.inc
+++ b/absl/debugging/symbolize_elf.inc
@@ -305,7 +305,7 @@ class Symbolizer {
                                            char *tmp_buf, int tmp_buf_size);
 
   enum {
-    SYMBOL_BUF_SIZE = 2048,
+    SYMBOL_BUF_SIZE = 3072,
     TMP_BUF_SIZE = 1024,
     SYMBOL_CACHE_LINES = 128,
   };