This is an archive of the discontinued LLVM Phabricator instance.

Fix a crash in option parsing.
ClosedPublic

Authored by aprantl on Jun 10 2019, 4:57 PM.

Diff Detail

Event Timeline

aprantl created this revision.Jun 10 2019, 4:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2019, 4:57 PM
This revision is now accepted and ready to land.Jun 10 2019, 11:02 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 11 2019, 2:12 PM

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.

mgorny added a subscriber: mgorny.Jun 20 2019, 2:27 AM

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.

@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.

labath added a subscriber: labath.Jun 25 2019, 7:16 AM

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...