Skip to content

mips64 crashes or hangs on 128 bit division #116440

Closed as not planned
Closed as not planned
@AaronKutch

Description

@AaronKutch

This target either crashes or hangs with different arguments to a 128 bit division

#[inline(never)]
fn test(x: u128, y: u128) -> u128 {
    x.wrapping_div(y)
}

fn main() {
    dbg!(test(123 << 64, (32 << 64) | 65));
    //dbg!(test(1 << 96,  1 << 64));
}

this happens with cross run --target mips64-unknown-linux-gnuabi64 -Z build-std=core,alloc,proc_macro,std, but I don't know how to get the version that cross is using, also #115218 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessO-MIPSTarget: MIPS processorsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions