The call to getopt_long didn't handle the case where the *last* option had an argument missing.
Details
- Reviewers
JDevlieghere - Commits
- rGc8e8b274f1c0: Reapply "Fix a crash in option parsing."
rLLDB364260: Reapply "Fix a crash in option parsing."
rL364260: Reapply "Fix a crash in option parsing."
rGe6130a309094: Fix a crash in option parsing.
rLLDB363101: Fix a crash in option parsing.
rL363101: Fix a crash in option parsing.
Diff Detail
- Repository
- rL LLVM
Event Timeline
This test is extremely flaky on Windows - it looks like it passes on the bot less than 10% of the time: http://lab.llvm.org:8011/buildslaves/win-py3-buildbot.
The added test broke NetBSD buildbot: http://lab.llvm.org:8011/builders/netbsd-amd64/builds/109/steps/run%20unit%20tests/logs/FAIL%3A%20LLDB%3A%3ATestProcessAttach.test
Apparently this doesn't work as expected here:
$ /home/mgorny/llvm-project/build-rel-master/bin/lldb --no-lldbinit -S /home/mgorny/llvm-project/llvm/tools/lldb/lit/lit-lldb-init -x -b -S /home/mgorny/llvm-project/lldb/lit/Driver/Inputs/process_attach_pid.in (lldb) command source -s 0 '/home/mgorny/llvm-project/llvm/tools/lldb/lit/lit-lldb-init' Executing commands in '/home/mgorny/llvm-project/llvm/tools/lldb/lit/lit-lldb-init'. (lldb) # LLDB init file for the LIT tests. (lldb) settings set symbols.enable-external-lookup false (lldb) settings set interpreter.echo-comment-commands false (lldb) command source -s 0 '/home/mgorny/llvm-project/lldb/lit/Driver/Inputs/process_attach_pid.in' Executing commands in '/home/mgorny/llvm-project/lldb/lit/Driver/Inputs/process_attach_pid.in'. (lldb) process attach --pid error: unknown or ambiguous option
@stella.stamenova could you try running the lldb invocation manually like I did? I'm wondering if you're getting the same issue.
It is the same. The interesting thing is that it passes maybe 1/10 of the time on the Buildbot.
BTW, the new version was now failing on linux for a change.
I believe r364317 ought to implement this in a way that is compatible with all getopt implementations that we are using...