about summary refs log tree commit diff
path: root/absl/debugging/symbolize_win32.inc
diff options
context:
space:
mode:
authorLoo Rong Jie <loorongjie@gmail.com>2019-10-22T00·34+0800
committerDerek Mauro <761129+derekmauro@users.noreply.github.com>2019-10-22T00·34-0400
commitecc0033b54847f6c9ee37dbb0be8aa17e5b6d37b (patch)
tree28c3385c6dac9610cdf172ac984d2593516cf883 /absl/debugging/symbolize_win32.inc
parent2796d500aea5a31d26b8b24a33fab7a1c8fa2f32 (diff)
Always enable proper symbolize implementation on Windows (#257)
Diffstat (limited to 'absl/debugging/symbolize_win32.inc')
-rw-r--r--absl/debugging/symbolize_win32.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc
index 5a55f29d2966..0fb4b803769d 100644
--- a/absl/debugging/symbolize_win32.inc
+++ b/absl/debugging/symbolize_win32.inc
@@ -57,9 +57,8 @@ bool Symbolize(const void *pc, char *out, int out_size) {
   if (out_size <= 0) {
     return false;
   }
-  std::aligned_storage<sizeof(SYMBOL_INFO) + MAX_SYM_NAME,
-                       alignof(SYMBOL_INFO)>::type buf;
-  SYMBOL_INFO *symbol = reinterpret_cast<SYMBOL_INFO *>(&buf);
+  alignas(SYMBOL_INFO) char buf[sizeof(SYMBOL_INFO) + MAX_SYM_NAME];
+  SYMBOL_INFO *symbol = reinterpret_cast<SYMBOL_INFO *>(buf);
   symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
   symbol->MaxNameLen = MAX_SYM_NAME;
   if (!SymFromAddr(process, reinterpret_cast<DWORD64>(pc), nullptr, symbol)) {