mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
GH-93249: relax overly strict assertion on bounds->ar_start (GH-93961)
This commit is contained in:
parent
cfb986a1a2
commit
1603a1029f
2 changed files with 33 additions and 2 deletions
|
@ -826,6 +826,11 @@ next_code_delta(PyCodeAddressRange *bounds)
|
|||
static int
|
||||
previous_code_delta(PyCodeAddressRange *bounds)
|
||||
{
|
||||
if (bounds->ar_start == 0) {
|
||||
// If we looking at the first entry, the
|
||||
// "previous" entry has an implicit length of 1.
|
||||
return 1;
|
||||
}
|
||||
const uint8_t *ptr = bounds->opaque.lo_next-1;
|
||||
while (((*ptr) & 128) == 0) {
|
||||
ptr--;
|
||||
|
@ -869,7 +874,7 @@ static void
|
|||
retreat(PyCodeAddressRange *bounds)
|
||||
{
|
||||
ASSERT_VALID_BOUNDS(bounds);
|
||||
assert(bounds->ar_start > 0);
|
||||
assert(bounds->ar_start >= 0);
|
||||
do {
|
||||
bounds->opaque.lo_next--;
|
||||
} while (((*bounds->opaque.lo_next) & 128) == 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue