[Lldb-commits] [lldb] Don't crash reloading a corefile saved from a live process (PR #224324)

Yao Qi via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 29 14:55:23 PDT 2026


qiyao wrote:

> 1. Why are we even loading instrumentation runtime plugins on a corefile? The process isn't live so it doesn't sound useful to load these plugins at all.

Short answer is that this instrumentation runtime plugin isn't disabled on corefile.   I had a note about this, but I need to find it out.

> 2. I'm a little confused about the explaination.
> > Reloading the same live process from a mach-o corefile does not hit this,
> > for two different reasons depending on --style. A --style=stack
> > corefile does not load libsystem_sanitizers.dylib at all
> 
> I'm a little confused. We say we can crash LLDB using `--style=stack` but then later say that it doesn't hit this? I suspect I'm missing something here.

The `minidump` corefile crashes lldb, but `mach-o` corefile doesn't. `--plugin-name` get two different options (`minidump` and `mach-o`) in two runs:

```
(lldb) process save-core --plugin-name=mach-o --style=stack /tmp/stack_mach-o.core
Saving 32768 bytes of data for memory region at 0x16fdf8000

Modified-memory or stack-memory only corefile created.  This corefile may
not show library/framework/app binaries on a different system, or when
those binaries have been updated/modified. Copies are not included
in this corefile.  Use --style full to include all process memory.
(lldb) target create --core /tmp/stack_mach-o.core
Core file '/tmp/stack_mach-o.core' (arm64) was loaded.
```

```
(lldb) process save-core --plugin-name=minidump --style=stack /tmp/core.dmp

Modified-memory or stack-memory only corefile created.  This corefile may
not show library/framework/app binaries on a different system, or when
those binaries have been updated/modified. Copies are not included
in this corefile.  Use --style full to include all process memory.
(lldb) target create --core /tmp/core.dmp
Assertion failed: (0 && "breakpoint has no resolved locations"), function Activate, file InstrumentationRuntimeBoundsSafety.cpp, line 467.
LLDB diagnostics will be written to /var/folders/z_/5ffmjny11m32v4frk1z94j700000gn/T/diagnostics-a9ba18
Please include the directory content when filing a bug report
zsh: abort      ../build/bin/lldb /tmp/a.out
```

https://github.com/llvm/llvm-project/pull/224324


More information about the lldb-commits mailing list