diff options
Diffstat (limited to 'gnu/llvm/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h')
-rw-r--r-- | gnu/llvm/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gnu/llvm/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h b/gnu/llvm/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h index 71de1758b3e..29a08386d0b 100644 --- a/gnu/llvm/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h +++ b/gnu/llvm/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h @@ -21,7 +21,7 @@ namespace __sanitizer { // Parsing helpers, 'str' is searched for delimiter(s) and a string or uptr // is extracted. When extracting a string, a newly allocated (using -// InternalAlloc) and null-terminataed buffer is returned. They return a pointer +// InternalAlloc) and null-terminated buffer is returned. They return a pointer // to the next characted after the found delimiter. const char *ExtractToken(const char *str, const char *delims, char **result); const char *ExtractInt(const char *str, const char *delims, int *result); @@ -70,11 +70,6 @@ class SymbolizerTool { return nullptr; } - // Called during the LateInitialize phase of Sanitizer initialization. - // Usually this is a safe place to call code that might need to use user - // memory allocators. - virtual void LateInitialize() {} - protected: ~SymbolizerTool() {} }; @@ -91,13 +86,14 @@ class SymbolizerProcess { ~SymbolizerProcess() {} /// The maximum number of arguments required to invoke a tool process. - static const unsigned kArgVMax = 6; + static const unsigned kArgVMax = 16; // Customizable by subclasses. virtual bool StartSymbolizerSubprocess(); - virtual bool ReadFromSymbolizer(char *buffer, uptr max_length); + virtual bool ReadFromSymbolizer(); // Return the environment to run the symbolizer in. virtual char **GetEnvP() { return GetEnviron(); } + InternalMmapVector<char> &GetBuff() { return buffer_; } private: virtual bool ReachedEndOfOutput(const char *buffer, uptr length) const { @@ -118,8 +114,7 @@ class SymbolizerProcess { fd_t input_fd_; fd_t output_fd_; - static const uptr kBufferSize = 16 * 1024; - char buffer_[kBufferSize]; + InternalMmapVector<char> buffer_; static const uptr kMaxTimesRestarted = 5; static const int kSymbolizerStartupTimeMillis = 10; |