[lldb/Reproducers] Fix API boundary tracking bug
authorJonas Devlieghere <jonas@devlieghere.com>
Thu, 30 Jan 2020 19:20:15 +0000 (11:20 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 30 Jan 2020 19:22:12 +0000 (11:22 -0800)
commit05badc60b7f4dff3c1b9efd5d7eea13979e255db
treeb96bd9f27c1232be864be073ec66975f2607cbb4
parent8b737688c21a9755cae14cb9343930e0882164ab
[lldb/Reproducers] Fix API boundary tracking bug

When recording the result from the LLDB_RECORD_RESULT macro, we need to
update the boundary so we capture the copy constructor. However, when
called to record the this pointer of the (copy) constructor itself, the
boundary should not be toggled, because it is called from the
LLDB_RECORD_CONSTRUCTOR macro, which might be followed by other API
calls.

This manifested itself as an object encountered during replay that we
hadn't seen before. The index-to-object mapping would return a nullptr
and lldb would crash.
lldb/include/lldb/Utility/ReproducerInstrumentation.h