[all-commits] [llvm/llvm-project] a6cace: [lldb] Don't crash when attempting to parse breakp...
Jordan Rupprecht via All-commits
all-commits at lists.llvm.org
Mon Apr 1 14:02:35 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a6caceed8d27d4ebd44c517c3114a36a64ebddfe
https://github.com/llvm/llvm-project/commit/a6caceed8d27d4ebd44c517c3114a36a64ebddfe
Author: Jordan Rupprecht <rupprecht at google.com>
Date: 2024-04-01 (Mon, 01 Apr 2024)
Changed paths:
M lldb/source/Breakpoint/BreakpointIDList.cpp
M lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
Log Message:
-----------
[lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (#87263)
We check if the next character after `N.` is `*` before we check its
length. Using `split` on the string is cleaner and less error prone than
using indices with `find` and `substr`.
Note: this does not make `N.` mean anything, it just prevents assertion
failures. `N.` is treated the same as an unrecognized breakpoint name:
```
(lldb) breakpoint enable 1
1 breakpoints enabled.
(lldb) breakpoint enable 1.*
1 breakpoints enabled.
(lldb) breakpoint enable 1.
0 breakpoints enabled.
(lldb) breakpoint enable xyz
0 breakpoints enabled.
```
Found via LLDB fuzzers.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list