In AtosSymbolizer, we're using forkpty() to create a new pseudo-terminal to communicate with the atos tool (we need that to avoid output buffering in interactive mode). This however redirects both stdout and stderr into a single stream, so when we read the output, we can't distinguish between errors and standard replies. Let's save&restore stderr to avoid that.
Details
Details
- Reviewers
kcc glider dvyukov samsonov - Commits
- rG036d0600448d: [sanitizer] Restore stderr when using forkpty() to spawn external symbolizer
rCRT265923: [sanitizer] Restore stderr when using forkpty() to spawn external symbolizer
rL265923: [sanitizer] Restore stderr when using forkpty() to spawn external symbolizer
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM with a nit
lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | ||
---|---|---|
95 | add close(saved_stderr) after this line just for completeness |
add close(saved_stderr) after this line just for completeness