Skip to content

verify: Add test demonstrating negative start state crash#247

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/944930505
Open

verify: Add test demonstrating negative start state crash#247
copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/944930505

Conversation

@copybara-service

Copy link
Copy Markdown

verify: Add test demonstrating negative start state crash

Negative state IDs (other than kNoStateId) currently bypass the
initial bounds check (start >= ns) because start and ns are
signed. This leads to crashes later in ComputeProperties (which calls
DfsVisit) when it attempts to use the negative start state ID as an
index into vectors.

Use EXPECT_DEATH to verify the crash occurs.

Negative state IDs (other than `kNoStateId`) currently bypass the
initial bounds check (`start >= ns`) because `start` and `ns` are
signed. This leads to crashes later in `ComputeProperties` (which calls
`DfsVisit`) when it attempts to use the negative start state ID as an
index into vectors.

Use `EXPECT_DEATH` to verify the crash occurs.

PiperOrigin-RevId: 944930505
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant