Skip to content

Undefined behavior negating minimum int64_t value #96

Description

@jandem

There are a few places where the aarch64 code uses -operand.immediate(). If the immediate is INT64_MIN, the behavior is undefined.

This was fixed for Add and Sub in 2020 in b8da04d, but the same pattern still shows up in Ccmp, Ccmn, and Neg.

We (Mozilla) ran into this because our fork didn't have the fix for Add and Sub and it was causing problems with recent Clang versions, but we then noticed the same pattern is still present in these other methods.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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