Skip to content

addition overflow in LargeCmisOp::build_many() #235

@Nieuwejaar

Description

@Nieuwejaar

I'm seeing dendrite crash repeatedly on london with an addition overflow here:

https://github.com/oxidecomputer/dendrite/blob/main/dpd/src/transceivers/tofino_impl.rs#L3592

    fn build_many(
        page: P,
        offset: u8,
        len: u8,
    ) -> Result<Vec<Self>, ControllerError> {
        let end = offset + len;     <---

I added a log message which showed that both offset and len were 128, explaining the crash. I suspect we don't often see this crash because we don't typically run a debug build, but I'm surprised that we've never seen this before. Maybe there's a new transceiver on the system that triggers this condition?

Converting these to usize before doing the math addresses the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions