This is an archive of the discontinued LLVM Phabricator instance.

[Windows] Dump more information about access violation exception
ClosedPublic

Authored by leonid.mashinskiy on Apr 10 2019, 9:30 AM.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

stella.stamenova accepted this revision.Apr 10 2019, 9:34 AM
This revision is now accepted and ready to land.Apr 10 2019, 9:34 AM

Thanks for review!

Please, commit this for me, because I have no commit access.

Does this affect any existing tests? Is there a good way to test it?

  • added access violation exception message test

Does this affect any existing tests?

I didn't notice new failures and didn't find any existing tests for windows exceptions.

I ran local tests with this and a couple of the tests from the lldb suite failed:

lldb-Suite :: functionalities/inferior-crashing/TestInferiorCrashing.py
lldb-Suite :: functionalities/thread/crash_during_step/TestCrashDuringStep.py

Here's the error from one of them (they are the same):

##[error]CUSTOMBUILD(0,0): Error : test_step_inst_with_dwarf (TestCrashDuringStep.CrashDuringStepTestCase)
     1>CUSTOMBUILD : error : test_step_inst_with_dwarf (TestCrashDuringStep.CrashDuringStepTestCase) [e:\_work\32\b\LLVMBuild\check-all.vcxproj]
         
            Test thread creation during step-inst handling.
         
         ----------------------------------------------------------------------
         
         Traceback (most recent call last):
         
           File "E:\_work\32\s\llvm\tools\lldb\packages\Python\lldbsuite\test\lldbtest.py", line 1746, in test_method
         
             return attrvalue(self)
         
           File "E:\_work\32\s\llvm\tools\lldb\packages\Python\lldbsuite\test\decorators.py", line 114, in wrapper
         
             func(*args, **kwargs)
         
           File "E:\_work\32\s\llvm\tools\lldb\packages\Python\lldbsuite\test\functionalities\thread\crash_during_step\TestCrashDuringStep.py", line 51, in test_step_inst_with
         
             while process.GetState() == lldb.eStateStopped and not lldbutil.is_thread_crashed(self, thread):
         
           File "E:\_work\32\s\llvm\tools\lldb\packages\Python\lldbsuite\test\lldbutil.py", line 740, in is_thread_crashed
         
             return "Exception 0xc0000005" in thread.GetStopDescription(100)
         
           File "E:\_work\32\b\LLVMBuild\Release\lib\site-packages\lldb\__init__.py", line 11874, in GetStopDescription
         
             return _lldb.SBThread_GetStopDescription(self, dst)
         
         UnicodeDecodeError: 'utf-8' codec can't decode byte 0x97 in position 104: invalid start byte
         
         Config=x86_64-E:\_work\32\b\LLVMBuild\Release\bin\clang.exe
stella.stamenova requested changes to this revision.Apr 16 2019, 11:29 AM
This revision now requires changes to proceed.Apr 16 2019, 11:29 AM
  • increased buffer size in GetStopDescription call to fit new message

Thanks for the new test and the test fix. It's unfortunate that the tests are so sensitive to an arbitrary buffer size.

Ping!
Are these changes accepted ?

Yes, sorry. I hadn't gotten around to testing it to make sure the failures were gone. Do you still need someone to commit for you?

This revision is now accepted and ready to land.Apr 25 2019, 11:04 AM

Thanks!
I think I can ask @aleksandr.urakov to land changes.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2019, 12:27 AM