[PATCH] D157210: [symbolizer] Change reaction on invalid input
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 02:42:45 PDT 2023
sepavloff added a comment.
The test hang is caused by the way `llvm-symbolizer` is ised in the test.
The test invokes `llvm-symbolizer` without arguments. So it tries to get both binary file an address from stdin. The script in the original test supplies `foo` to the `llvm-symbolizer`. This is an incorrect input, `foo` is treated as a binary file, but an address is absent, so the old `llvm-symbolizer` echoes `foo` on stdout. The script gets output on stdout and finishes.
The new `llvm-symbolizer` also detects the invalid command and puts descriptive diagnostic on **stderr**:
$ ./llvm-symbolizer
foo
./llvm-symbolizer: error: 'foo': no input filename is specified
Nothing appears on stdout in this case and the script continues waiting, - the test hangs.
Adding two words to the input of `llvm-symbolizer` make the command syntactically correct. Obviously, the tool cannot find source information in response to such command, so `??:0` is printed on stdout. The test script gets data it is wainting for and the test normally finishes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157210/new/
https://reviews.llvm.org/D157210
More information about the llvm-commits
mailing list