[PATCH] D157210: [symbolizer] Change reaction on invalid input

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 00:14:47 PDT 2023


jhenderson added a comment.

In D157210#4584620 <https://reviews.llvm.org/D157210#4584620>, @sepavloff wrote:

> In D157210#4584361 <https://reviews.llvm.org/D157210#4584361>, @jhenderson wrote:
>
>> My opinion is that if someone is in interactive mode and they get an error, it may make sense to exit llvm-symbolizer, rather than continue. How does this differ to the previous (prior to your patch) behaviour for other error cases (i.e. cases other than "missing an input file/address pair")?
>
> This is behavior of `llvm-symbolizer` before this patch. Whenever it detects an invalid input it echoes the input and continue waiting on stdin. This behavior makes sense, - if the program got wrong command from interactive input, it can continue working because the next commands may do useful job.
>
> Anyway, it is not `llvm-symbolizer` that caused the hang, it is blocking read in the test script, which waits input from the stream that is empty in the case of new `llvm-symbolizer`.

Sorry, I'm struggling to follow what you're saying. My concern is that because we had a test script that has gone from working to hanging, it's possible that an end user's script will be in the same state, so when they get the updated llvm-symbolizer, they will have a script that was previously working but is now hanging. I'm not concerned by llvm-symbolizer changing in other ways that could potentially invalidate their script, but introducing a potential path to a hang is a cause for concern. What does llvm-addr2line do in this sort of situation? Does it print something like "??:0:0" (as well as the error), because I think that might be a good answer.

@MaskRay, any thoughts?


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