[PATCH] D65252: [sanitizer_common] Allow customization of StartSymbolizerSubprocess
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 17:20:46 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366967: [sanitizer_common] Allow customization of StartSymbolizerSubprocess (authored by yln, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D65252?vs=211629&id=211643#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65252/new/
https://reviews.llvm.org/D65252
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_internal.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
@@ -57,6 +57,11 @@
}
private:
+ virtual bool StartSymbolizerSubprocess() override {
+ // Configure sandbox before starting atos process.
+ return SymbolizerProcess::StartSymbolizerSubprocess();
+ }
+
bool ReachedEndOfOutput(const char *buffer, uptr length) const override {
return (length >= 1 && buffer[length - 1] == '\n');
}
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_internal.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_internal.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_internal.h
@@ -80,26 +80,27 @@
const char *SendCommand(const char *command);
protected:
+ /// The maximum number of arguments required to invoke a tool process.
+ static const unsigned kArgVMax = 6;
+
+ // Customizable by subclasses.
+ virtual bool StartSymbolizerSubprocess();
+ virtual bool ReadFromSymbolizer(char *buffer, uptr max_length);
+
+ private:
virtual bool ReachedEndOfOutput(const char *buffer, uptr length) const {
UNIMPLEMENTED();
}
- /// The maximum number of arguments required to invoke a tool process.
- enum { kArgVMax = 6 };
-
/// Fill in an argv array to invoke the child process.
virtual void GetArgV(const char *path_to_binary,
const char *(&argv)[kArgVMax]) const {
UNIMPLEMENTED();
}
- virtual bool ReadFromSymbolizer(char *buffer, uptr max_length);
-
- private:
bool Restart();
const char *SendCommandImpl(const char *command);
bool WriteToSymbolizer(const char *buffer, uptr length);
- bool StartSymbolizerSubprocess();
const char *path_;
fd_t input_fd_;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65252.211643.patch
Type: text/x-patch
Size: 1993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190725/2f2c4b82/attachment.bin>
More information about the llvm-commits
mailing list