[Lldb-commits] [PATCH] D90987: [lldb] Avoid confusing crashes during reproducer replay when initialization failed

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 9 08:58:08 PST 2020


JDevlieghere added a comment.

In D90987#2381853 <https://reviews.llvm.org/D90987#2381853>, @labath wrote:

> I wonder if there's a way to add some consistency checks into the (active) replay machinery. Like, maybe we could, for each function that returns an SBError, record a flag saying whether that error was in a success state or not. Then if this flag differs during replay, we know that we have started to diverge and can stop replaying (or at least give a very loud warning about it).

On the one hand I like the idea of detecting divergence early, but on the other hand I don't like special-casing something for SBError. There's a bunch of function that return a boolean and some that got error handling after the fact through and overload with an in-out parameter. A more generic approach could be a way to checkpoint the "object registry" an give (some of) the SB classes a private method that returns a "hash" (whatever that means for the reproducers, for an SBError that could be success or not, but for a target or a process it could be whether it's connected) and then have the reproducers periodically compare the state of the registry against that in the reproducer.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90987/new/

https://reviews.llvm.org/D90987



More information about the lldb-commits mailing list