1 //===-- sanitizer_symbolizer_posix_libcdep.cc -----------------------------===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is shared between AddressSanitizer and ThreadSanitizer
10 // POSIX-specific implementation of symbolizer parts.
11 //===----------------------------------------------------------------------===//
13 #include "sanitizer_platform.h"
15 #include "sanitizer_allocator_internal.h"
16 #include "sanitizer_common.h"
17 #include "sanitizer_flags.h"
18 #include "sanitizer_internal_defs.h"
19 #include "sanitizer_linux.h"
20 #include "sanitizer_placement_new.h"
21 #include "sanitizer_procmaps.h"
22 #include "sanitizer_symbolizer.h"
23 #include "sanitizer_symbolizer_libbacktrace.h"
30 // C++ demangling function, as required by Itanium C++ ABI. This is weak,
31 // because we do not require a C++ ABI library to be linked to a program
32 // using sanitizers; if it's not present, we'll just use the mangled name.
33 namespace __cxxabiv1
{
34 extern "C" SANITIZER_WEAK_ATTRIBUTE
35 char *__cxa_demangle(const char *mangled
, char *buffer
,
36 size_t *length
, int *status
);
39 namespace __sanitizer
{
41 // Attempts to demangle the name via __cxa_demangle from __cxxabiv1.
42 static const char *DemangleCXXABI(const char *name
) {
43 // FIXME: __cxa_demangle aggressively insists on allocating memory.
44 // There's not much we can do about that, short of providing our
45 // own demangler (libc++abi's implementation could be adapted so that
46 // it does not allocate). For now, we just call it anyway, and we leak
47 // the returned value.
48 if (__cxxabiv1::__cxa_demangle
)
49 if (const char *demangled_name
=
50 __cxxabiv1::__cxa_demangle(name
, 0, 0, 0))
51 return demangled_name
;
56 // Extracts the prefix of "str" that consists of any characters not
57 // present in "delims" string, and copies this prefix to "result", allocating
59 // Returns a pointer to "str" after skipping extracted prefix and first
61 static const char *ExtractToken(const char *str
, const char *delims
,
63 uptr prefix_len
= internal_strcspn(str
, delims
);
64 *result
= (char*)InternalAlloc(prefix_len
+ 1);
65 internal_memcpy(*result
, str
, prefix_len
);
66 (*result
)[prefix_len
] = '\0';
67 const char *prefix_end
= str
+ prefix_len
;
68 if (*prefix_end
!= '\0') prefix_end
++;
72 // Same as ExtractToken, but converts extracted token to integer.
73 static const char *ExtractInt(const char *str
, const char *delims
,
76 const char *ret
= ExtractToken(str
, delims
, &buff
);
78 *result
= (int)internal_atoll(buff
);
84 static const char *ExtractUptr(const char *str
, const char *delims
,
87 const char *ret
= ExtractToken(str
, delims
, &buff
);
89 *result
= (uptr
)internal_atoll(buff
);
95 class ExternalSymbolizerInterface
{
97 // Can't declare pure virtual functions in sanitizer runtimes:
98 // __cxa_pure_virtual might be unavailable.
99 virtual char *SendCommand(bool is_data
, const char *module_name
,
100 uptr module_offset
) {
105 // SymbolizerProcess encapsulates communication between the tool and
106 // external symbolizer program, running in a different subprocess.
107 // SymbolizerProcess may not be used from two threads simultaneously.
108 class SymbolizerProcess
: public ExternalSymbolizerInterface
{
110 explicit SymbolizerProcess(const char *path
)
112 input_fd_(kInvalidFd
),
113 output_fd_(kInvalidFd
),
115 failed_to_start_(false),
116 reported_invalid_path_(false) {
118 CHECK_NE(path_
[0], '\0');
121 char *SendCommand(bool is_data
, const char *module_name
, uptr module_offset
) {
122 for (; times_restarted_
< kMaxTimesRestarted
; times_restarted_
++) {
123 // Start or restart symbolizer if we failed to send command to it.
124 if (char *res
= SendCommandImpl(is_data
, module_name
, module_offset
))
128 if (!failed_to_start_
) {
129 Report("WARNING: Failed to use and restart external symbolizer!\n");
130 failed_to_start_
= true;
137 if (input_fd_
!= kInvalidFd
)
138 internal_close(input_fd_
);
139 if (output_fd_
!= kInvalidFd
)
140 internal_close(output_fd_
);
141 return StartSymbolizerSubprocess();
144 char *SendCommandImpl(bool is_data
, const char *module_name
,
145 uptr module_offset
) {
146 if (input_fd_
== kInvalidFd
|| output_fd_
== kInvalidFd
)
149 if (!RenderInputCommand(buffer_
, kBufferSize
, is_data
, module_name
,
152 if (!writeToSymbolizer(buffer_
, internal_strlen(buffer_
)))
154 if (!readFromSymbolizer(buffer_
, kBufferSize
))
159 bool readFromSymbolizer(char *buffer
, uptr max_length
) {
164 uptr just_read
= internal_read(input_fd_
, buffer
+ read_len
,
165 max_length
- read_len
- 1);
166 // We can't read 0 bytes, as we don't expect external symbolizer to close
168 if (just_read
== 0 || just_read
== (uptr
)-1) {
169 Report("WARNING: Can't read from symbolizer at fd %d\n", input_fd_
);
172 read_len
+= just_read
;
173 if (ReachedEndOfOutput(buffer
, read_len
))
176 buffer
[read_len
] = '\0';
180 bool writeToSymbolizer(const char *buffer
, uptr length
) {
183 uptr write_len
= internal_write(output_fd_
, buffer
, length
);
184 if (write_len
== 0 || write_len
== (uptr
)-1) {
185 Report("WARNING: Can't write to symbolizer at fd %d\n", output_fd_
);
191 bool StartSymbolizerSubprocess() {
192 if (!FileExists(path_
)) {
193 if (!reported_invalid_path_
) {
194 Report("WARNING: invalid path to external symbolizer!\n");
195 reported_invalid_path_
= true;
202 // The client program may close its stdin and/or stdout and/or stderr
203 // thus allowing socketpair to reuse file descriptors 0, 1 or 2.
204 // In this case the communication between the forked processes may be
205 // broken if either the parent or the child tries to close or duplicate
206 // these descriptors. The loop below produces two pairs of file
207 // descriptors, each greater than 2 (stderr).
209 for (int i
= 0; i
< 5; i
++) {
210 if (pipe(sock_pair
[i
]) == -1) {
211 for (int j
= 0; j
< i
; j
++) {
212 internal_close(sock_pair
[j
][0]);
213 internal_close(sock_pair
[j
][1]);
215 Report("WARNING: Can't create a socket pair to start "
216 "external symbolizer (errno: %d)\n", errno
);
218 } else if (sock_pair
[i
][0] > 2 && sock_pair
[i
][1] > 2) {
222 outfd
= sock_pair
[i
];
223 for (int j
= 0; j
< i
; j
++) {
224 if (sock_pair
[j
] == infd
) continue;
225 internal_close(sock_pair
[j
][0]);
226 internal_close(sock_pair
[j
][1]);
235 // Real fork() may call user callbacks registered with pthread_atfork().
236 int pid
= internal_fork();
239 internal_close(infd
[0]);
240 internal_close(infd
[1]);
241 internal_close(outfd
[0]);
242 internal_close(outfd
[1]);
243 Report("WARNING: failed to fork external symbolizer "
244 " (errno: %d)\n", errno
);
246 } else if (pid
== 0) {
248 internal_close(STDOUT_FILENO
);
249 internal_close(STDIN_FILENO
);
250 internal_dup2(outfd
[0], STDIN_FILENO
);
251 internal_dup2(infd
[1], STDOUT_FILENO
);
252 internal_close(outfd
[0]);
253 internal_close(outfd
[1]);
254 internal_close(infd
[0]);
255 internal_close(infd
[1]);
256 for (int fd
= sysconf(_SC_OPEN_MAX
); fd
> 2; fd
--)
258 ExecuteWithDefaultArgs(path_
);
262 // Continue execution in parent process.
263 internal_close(outfd
[0]);
264 internal_close(infd
[1]);
266 output_fd_
= outfd
[1];
268 // Check that symbolizer subprocess started successfully.
270 SleepForMillis(kSymbolizerStartupTimeMillis
);
271 int exited_pid
= waitpid(pid
, &pid_status
, WNOHANG
);
272 if (exited_pid
!= 0) {
273 // Either waitpid failed, or child has already exited.
274 Report("WARNING: external symbolizer didn't start up correctly!\n");
281 virtual bool RenderInputCommand(char *buffer
, uptr max_length
, bool is_data
,
282 const char *module_name
,
283 uptr module_offset
) const {
287 virtual bool ReachedEndOfOutput(const char *buffer
, uptr length
) const {
291 virtual void ExecuteWithDefaultArgs(const char *path_to_binary
) const {
299 static const uptr kBufferSize
= 16 * 1024;
300 char buffer_
[kBufferSize
];
302 static const uptr kMaxTimesRestarted
= 5;
303 static const int kSymbolizerStartupTimeMillis
= 10;
304 uptr times_restarted_
;
305 bool failed_to_start_
;
306 bool reported_invalid_path_
;
309 // For now we assume the following protocol:
310 // For each request of the form
311 // <module_name> <module_offset>
312 // passed to STDIN, external symbolizer prints to STDOUT response:
314 // <file_name>:<line_number>:<column_number>
316 // <file_name>:<line_number>:<column_number>
319 class LLVMSymbolizerProcess
: public SymbolizerProcess
{
321 explicit LLVMSymbolizerProcess(const char *path
) : SymbolizerProcess(path
) {}
324 bool RenderInputCommand(char *buffer
, uptr max_length
, bool is_data
,
325 const char *module_name
, uptr module_offset
) const {
326 internal_snprintf(buffer
, max_length
, "%s\"%s\" 0x%zx\n",
327 is_data
? "DATA " : "", module_name
, module_offset
);
331 bool ReachedEndOfOutput(const char *buffer
, uptr length
) const {
332 // Empty line marks the end of llvm-symbolizer output.
333 return length
>= 2 && buffer
[length
- 1] == '\n' &&
334 buffer
[length
- 2] == '\n';
337 void ExecuteWithDefaultArgs(const char *path_to_binary
) const {
338 #if defined(__x86_64__)
339 const char* const kSymbolizerArch
= "--default-arch=x86_64";
340 #elif defined(__i386__)
341 const char* const kSymbolizerArch
= "--default-arch=i386";
342 #elif defined(__powerpc64__)
343 const char* const kSymbolizerArch
= "--default-arch=powerpc64";
345 const char* const kSymbolizerArch
= "--default-arch=unknown";
347 execl(path_to_binary
, path_to_binary
, kSymbolizerArch
, (char *)0);
351 class Addr2LineProcess
: public SymbolizerProcess
{
353 Addr2LineProcess(const char *path
, const char *module_name
)
354 : SymbolizerProcess(path
), module_name_(internal_strdup(module_name
)) {}
356 const char *module_name() const { return module_name_
; }
359 bool RenderInputCommand(char *buffer
, uptr max_length
, bool is_data
,
360 const char *module_name
, uptr module_offset
) const {
363 CHECK_EQ(0, internal_strcmp(module_name
, module_name_
));
364 internal_snprintf(buffer
, max_length
, "0x%zx\n", module_offset
);
368 bool ReachedEndOfOutput(const char *buffer
, uptr length
) const {
369 // Output should consist of two lines.
371 for (uptr i
= 0; i
< length
; ++i
) {
372 if (buffer
[i
] == '\n')
380 void ExecuteWithDefaultArgs(const char *path_to_binary
) const {
381 execl(path_to_binary
, path_to_binary
, "-Cfe", module_name_
, (char *)0);
384 const char *module_name_
; // Owned, leaked.
387 class Addr2LinePool
: public ExternalSymbolizerInterface
{
389 explicit Addr2LinePool(const char *addr2line_path
,
390 LowLevelAllocator
*allocator
)
391 : addr2line_path_(addr2line_path
), allocator_(allocator
),
392 addr2line_pool_(16) {}
394 char *SendCommand(bool is_data
, const char *module_name
, uptr module_offset
) {
397 Addr2LineProcess
*addr2line
= 0;
398 for (uptr i
= 0; i
< addr2line_pool_
.size(); ++i
) {
400 internal_strcmp(module_name
, addr2line_pool_
[i
]->module_name())) {
401 addr2line
= addr2line_pool_
[i
];
407 new(*allocator_
) Addr2LineProcess(addr2line_path_
, module_name
);
408 addr2line_pool_
.push_back(addr2line
);
410 return addr2line
->SendCommand(is_data
, module_name
, module_offset
);
414 const char *addr2line_path_
;
415 LowLevelAllocator
*allocator_
;
416 InternalMmapVector
<Addr2LineProcess
*> addr2line_pool_
;
419 #if SANITIZER_SUPPORTS_WEAK_HOOKS
421 SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
422 bool __sanitizer_symbolize_code(const char *ModuleName
, u64 ModuleOffset
,
423 char *Buffer
, int MaxLength
);
424 SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
425 bool __sanitizer_symbolize_data(const char *ModuleName
, u64 ModuleOffset
,
426 char *Buffer
, int MaxLength
);
427 SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
428 void __sanitizer_symbolize_flush();
429 SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
430 int __sanitizer_symbolize_demangle(const char *Name
, char *Buffer
,
434 class InternalSymbolizer
{
436 typedef bool (*SanitizerSymbolizeFn
)(const char*, u64
, char*, int);
438 static InternalSymbolizer
*get(LowLevelAllocator
*alloc
) {
439 if (__sanitizer_symbolize_code
!= 0 &&
440 __sanitizer_symbolize_data
!= 0) {
441 return new(*alloc
) InternalSymbolizer();
446 char *SendCommand(bool is_data
, const char *module_name
, uptr module_offset
) {
447 SanitizerSymbolizeFn symbolize_fn
= is_data
? __sanitizer_symbolize_data
448 : __sanitizer_symbolize_code
;
449 if (symbolize_fn(module_name
, module_offset
, buffer_
, kBufferSize
))
455 if (__sanitizer_symbolize_flush
)
456 __sanitizer_symbolize_flush();
459 const char *Demangle(const char *name
) {
460 if (__sanitizer_symbolize_demangle
) {
461 for (uptr res_length
= 1024;
462 res_length
<= InternalSizeClassMap::kMaxSize
;) {
463 char *res_buff
= static_cast<char*>(InternalAlloc(res_length
));
465 __sanitizer_symbolize_demangle(name
, res_buff
, res_length
);
466 if (req_length
> res_length
) {
467 res_length
= req_length
+ 1;
468 InternalFree(res_buff
);
478 InternalSymbolizer() { }
480 static const int kBufferSize
= 16 * 1024;
481 static const int kMaxDemangledNameSize
= 1024;
482 char buffer_
[kBufferSize
];
484 #else // SANITIZER_SUPPORTS_WEAK_HOOKS
486 class InternalSymbolizer
{
488 static InternalSymbolizer
*get(LowLevelAllocator
*alloc
) { return 0; }
489 char *SendCommand(bool is_data
, const char *module_name
, uptr module_offset
) {
493 const char *Demangle(const char *name
) { return name
; }
496 #endif // SANITIZER_SUPPORTS_WEAK_HOOKS
498 class POSIXSymbolizer
: public Symbolizer
{
500 POSIXSymbolizer(ExternalSymbolizerInterface
*external_symbolizer
,
501 InternalSymbolizer
*internal_symbolizer
,
502 LibbacktraceSymbolizer
*libbacktrace_symbolizer
)
504 external_symbolizer_(external_symbolizer
),
505 internal_symbolizer_(internal_symbolizer
),
506 libbacktrace_symbolizer_(libbacktrace_symbolizer
) {}
508 uptr
SymbolizePC(uptr addr
, AddressInfo
*frames
, uptr max_frames
) {
509 BlockingMutexLock
l(&mu_
);
512 const char *module_name
;
514 if (!FindModuleNameAndOffsetForAddress(addr
, &module_name
, &module_offset
))
516 // First, try to use libbacktrace symbolizer (if it's available).
517 if (libbacktrace_symbolizer_
!= 0) {
519 uptr res
= libbacktrace_symbolizer_
->SymbolizeCode(
520 addr
, frames
, max_frames
, module_name
, module_offset
);
524 const char *str
= SendCommand(false, module_name
, module_offset
);
526 // Symbolizer was not initialized or failed. Fill only data
527 // about module name and offset.
528 AddressInfo
*info
= &frames
[0];
530 info
->FillAddressAndModuleInfo(addr
, module_name
, module_offset
);
534 for (frame_id
= 0; frame_id
< max_frames
; frame_id
++) {
535 AddressInfo
*info
= &frames
[frame_id
];
536 char *function_name
= 0;
537 str
= ExtractToken(str
, "\n", &function_name
);
538 CHECK(function_name
);
539 if (function_name
[0] == '\0') {
540 // There are no more frames.
544 info
->FillAddressAndModuleInfo(addr
, module_name
, module_offset
);
545 info
->function
= function_name
;
546 // Parse <file>:<line>:<column> buffer.
547 char *file_line_info
= 0;
548 str
= ExtractToken(str
, "\n", &file_line_info
);
549 CHECK(file_line_info
);
550 const char *line_info
= ExtractToken(file_line_info
, ":", &info
->file
);
551 line_info
= ExtractInt(line_info
, ":", &info
->line
);
552 line_info
= ExtractInt(line_info
, "", &info
->column
);
553 InternalFree(file_line_info
);
555 // Functions and filenames can be "??", in which case we write 0
556 // to address info to mark that names are unknown.
557 if (0 == internal_strcmp(info
->function
, "??")) {
558 InternalFree(info
->function
);
561 if (0 == internal_strcmp(info
->file
, "??")) {
562 InternalFree(info
->file
);
567 // Make sure we return at least one frame.
568 AddressInfo
*info
= &frames
[0];
570 info
->FillAddressAndModuleInfo(addr
, module_name
, module_offset
);
576 bool SymbolizeData(uptr addr
, DataInfo
*info
) {
577 BlockingMutexLock
l(&mu_
);
578 LoadedModule
*module
= FindModuleForAddress(addr
);
581 const char *module_name
= module
->full_name();
582 uptr module_offset
= addr
- module
->base_address();
583 internal_memset(info
, 0, sizeof(*info
));
584 info
->address
= addr
;
585 info
->module
= internal_strdup(module_name
);
586 info
->module_offset
= module_offset
;
587 // First, try to use libbacktrace symbolizer (if it's available).
588 if (libbacktrace_symbolizer_
!= 0) {
590 if (libbacktrace_symbolizer_
->SymbolizeData(info
))
593 const char *str
= SendCommand(true, module_name
, module_offset
);
596 str
= ExtractToken(str
, "\n", &info
->name
);
597 str
= ExtractUptr(str
, " ", &info
->start
);
598 str
= ExtractUptr(str
, "\n", &info
->size
);
599 info
->start
+= module
->base_address();
603 bool GetModuleNameAndOffsetForPC(uptr pc
, const char **module_name
,
604 uptr
*module_address
) {
605 BlockingMutexLock
l(&mu_
);
606 return FindModuleNameAndOffsetForAddress(pc
, module_name
, module_address
);
609 bool CanReturnFileLineInfo() {
610 return internal_symbolizer_
!= 0 || external_symbolizer_
!= 0 ||
611 libbacktrace_symbolizer_
!= 0;
615 BlockingMutexLock
l(&mu_
);
616 if (internal_symbolizer_
!= 0) {
617 SymbolizerScope
sym_scope(this);
618 internal_symbolizer_
->Flush();
622 const char *Demangle(const char *name
) {
623 BlockingMutexLock
l(&mu_
);
624 // Run hooks even if we don't use internal symbolizer, as cxxabi
625 // demangle may call system functions.
626 SymbolizerScope
sym_scope(this);
627 // Try to use libbacktrace demangler (if available).
628 if (libbacktrace_symbolizer_
!= 0) {
629 if (const char *demangled
= libbacktrace_symbolizer_
->Demangle(name
))
632 if (internal_symbolizer_
!= 0)
633 return internal_symbolizer_
->Demangle(name
);
634 return DemangleCXXABI(name
);
637 void PrepareForSandboxing() {
638 #if SANITIZER_LINUX && !SANITIZER_ANDROID
639 BlockingMutexLock
l(&mu_
);
640 // Cache /proc/self/exe on Linux.
646 char *SendCommand(bool is_data
, const char *module_name
, uptr module_offset
) {
648 // First, try to use internal symbolizer.
649 if (internal_symbolizer_
) {
650 SymbolizerScope
sym_scope(this);
651 return internal_symbolizer_
->SendCommand(is_data
, module_name
,
654 // Otherwise, fall back to external symbolizer.
655 if (external_symbolizer_
) {
656 SymbolizerScope
sym_scope(this);
657 return external_symbolizer_
->SendCommand(is_data
, module_name
,
663 LoadedModule
*FindModuleForAddress(uptr address
) {
665 bool modules_were_reloaded
= false;
666 if (modules_
== 0 || !modules_fresh_
) {
667 modules_
= (LoadedModule
*)(symbolizer_allocator_
.Allocate(
668 kMaxNumberOfModuleContexts
* sizeof(LoadedModule
)));
670 n_modules_
= GetListOfModules(modules_
, kMaxNumberOfModuleContexts
,
672 CHECK_GT(n_modules_
, 0);
673 CHECK_LT(n_modules_
, kMaxNumberOfModuleContexts
);
674 modules_fresh_
= true;
675 modules_were_reloaded
= true;
677 for (uptr i
= 0; i
< n_modules_
; i
++) {
678 if (modules_
[i
].containsAddress(address
)) {
682 // Reload the modules and look up again, if we haven't tried it yet.
683 if (!modules_were_reloaded
) {
684 // FIXME: set modules_fresh_ from dlopen()/dlclose() interceptors.
685 // It's too aggressive to reload the list of modules each time we fail
686 // to find a module for a given address.
687 modules_fresh_
= false;
688 return FindModuleForAddress(address
);
693 bool FindModuleNameAndOffsetForAddress(uptr address
, const char **module_name
,
694 uptr
*module_offset
) {
696 LoadedModule
*module
= FindModuleForAddress(address
);
699 *module_name
= module
->full_name();
700 *module_offset
= address
- module
->base_address();
704 // 16K loaded modules should be enough for everyone.
705 static const uptr kMaxNumberOfModuleContexts
= 1 << 14;
706 LoadedModule
*modules_
; // Array of module descriptions is leaked.
708 // If stale, need to reload the modules before looking up addresses.
712 ExternalSymbolizerInterface
*external_symbolizer_
; // Leaked.
713 InternalSymbolizer
*const internal_symbolizer_
; // Leaked.
714 LibbacktraceSymbolizer
*libbacktrace_symbolizer_
; // Leaked.
717 Symbolizer
*Symbolizer::PlatformInit() {
718 if (!common_flags()->symbolize
) {
719 return new(symbolizer_allocator_
) POSIXSymbolizer(0, 0, 0);
721 InternalSymbolizer
* internal_symbolizer
=
722 InternalSymbolizer::get(&symbolizer_allocator_
);
723 ExternalSymbolizerInterface
*external_symbolizer
= 0;
724 LibbacktraceSymbolizer
*libbacktrace_symbolizer
= 0;
726 if (!internal_symbolizer
) {
727 libbacktrace_symbolizer
=
728 LibbacktraceSymbolizer::get(&symbolizer_allocator_
);
729 if (!libbacktrace_symbolizer
) {
730 const char *path_to_external
= common_flags()->external_symbolizer_path
;
731 if (path_to_external
&& path_to_external
[0] == '\0') {
732 // External symbolizer is explicitly disabled. Do nothing.
734 // Find path to llvm-symbolizer if it's not provided.
735 if (!path_to_external
)
736 path_to_external
= FindPathToBinary("llvm-symbolizer");
737 if (path_to_external
) {
738 external_symbolizer
= new(symbolizer_allocator_
)
739 LLVMSymbolizerProcess(path_to_external
);
740 } else if (common_flags()->allow_addr2line
) {
741 // If llvm-symbolizer is not found, try to use addr2line.
742 if (const char *addr2line_path
= FindPathToBinary("addr2line")) {
743 external_symbolizer
= new(symbolizer_allocator_
)
744 Addr2LinePool(addr2line_path
, &symbolizer_allocator_
);
751 return new(symbolizer_allocator_
) POSIXSymbolizer(
752 external_symbolizer
, internal_symbolizer
, libbacktrace_symbolizer
);
755 } // namespace __sanitizer
757 #endif // SANITIZER_POSIX