DavidSpickett added inline comments.

================
Comment at: lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp:126
+    Address brk_address;
+    if (!target.ResolveLoadAddress(fixed_bad_address, brk_address))
+      return false;
----------------
vsk wrote:
> DavidSpickett wrote:
> > vsk wrote:
> > > DavidSpickett wrote:
> > > > What does it mean here that the address failed to resolve?
> > > It's possible that lldb doesn't know about the image the fixed address 
> > > points to (it could be a garbage value). In this case we conservatively 
> > > don't hint that there's a ptrauth issue.
> > So in that case we would report stopped due to a breakpoint, that's a 
> > special pac breakpoint but no pointer authentication issue? Isn't that 
> > confusing for the user?
> > 
> > Maybe not because it's hinting at accidental corruption vs. deliberate 
> > misdirection, you probably have the experiences to inform that.
> > 
> > This is an improvement as is so no need to change it I'm just curious.
> > 
> > Can you add a test for this situation? Assuming you can find an address you 
> > know would never be valid.
> The image containing the fixed address from x16 is usually loaded. If it's 
> not, that's indeed a very confusing situation (& would more likely than not 
> implicate an AppleClang bug). I don't believe the situation is made *more* 
> confusing because lldb declines to print a ptrauth hint. I've added a test 
> for this (it just sets x16 = 0xbad).
Thanks, reading the test I see what you mean.

You convert to `EXC_BAD_ACCESS` even if the x16 address isn't loaded, so I'm 
not seeing `EXC_BREAKPOINT` and wondering why I hit this breakpoint that I 
didn't add. (didn't add manually at least)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102428

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to