[lldb-dev] [Bug 21723] New: Setting a breakpoint on Windows leads to the target image file not being deletable for a short time even AFTER the process exits.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 2 23:30:43 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21723

            Bug ID: 21723
           Summary: Setting a breakpoint on Windows leads to the target
                    image file not being deletable for a short time even
                    AFTER the process exits.
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: zturner at google.com
          Reporter: zturner at google.com
                CC: lldb-dev at cs.uiuc.edu
    Classification: Unclassified

The python test suite uses LLDB as an in-process extension module.  When
running a test, it test suite first compiles the test program from source, and
then debugs the resulting executable.  When the test invokes LLDB's public API
to set a breakpoint, this is implemented by an eventual call to
WriteProcessMemory to write a breakpoint opcode into the target.  After the
test is complete, the test runner attempts to delete the compiled executable.

For some reason, this call to WriteProcessMemory prevents the test runner from
deleting the executable (error value is ERROR_ACCESS_DENIED).  Commenting out
this one system call -- and nothing else -- results in the executable being
deletable by the test suite.

This is incredibly strange behavior, and although I suspect a race condition
between closing all the handles to the process and the test runner attempting
to delete the process (perhaps a side effect of Bug 21722), there's no
reasonable explanation why WriteProcessMemory would trigger the race.  

The fix may be as simple as fixing Bug 21722, but it also may be something
different.  And even if it is, it might be worth investigating this further and
filing a bug against the Windows kernel.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20141203/b365bb94/attachment.html>


More information about the lldb-dev mailing list