[all-commits] [llvm/llvm-project] 831cf1: [compiler-rt] Handle None value when polling addr2...
David Spickett via All-commits
all-commits at lists.llvm.org
Mon May 10 01:46:31 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 831cf15ca6892e2044447f8dc516d76b8a827f1e
https://github.com/llvm/llvm-project/commit/831cf15ca6892e2044447f8dc516d76b8a827f1e
Author: David Spickett <david.spickett at linaro.org>
Date: 2021-05-10 (Mon, 10 May 2021)
Changed paths:
M compiler-rt/lib/asan/scripts/asan_symbolize.py
Log Message:
-----------
[compiler-rt] Handle None value when polling addr2line pipe
According to:
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.poll
poll can return None if the process hasn't terminated.
I'm not quite sure how addr2line could end up closing the pipe without
terminating but we did see this happen on one of our bots:
```
<...>scripts/asan_symbolize.py",
line 211, in symbolize
logging.debug("addr2line exited early (broken pipe), returncode=%d"
% self.pipe.poll())
TypeError: %d format: a number is required, not NoneType
```
Handle None by printing a message that we couldn't get the return
code.
Reviewed By: delcypher
Differential Revision: https://reviews.llvm.org/D101891
More information about the All-commits
mailing list