Skip to content

Discrepancy between ACIR and brillig pipeline #11402

@TomAFrench

Description

@TomAFrench

I've taken the fuzzer failure from https://github.com/noir-lang/noir/actions/runs/21504399531/job/61957526337 and minimised it to the following program

fn main(mut a: [(bool, str<2>); 2], b: str<1>, active: bool, index: u32) -> pub str<2> {
    a[index].1 = "cc";
    if active {
        unsafe { func_4(func_2b(), (0, b, a[0].1)) };
    };
    a[0].1
}
unconstrained fn func_2b() -> str<1> {
    "d"
}
unconstrained fn func_4(_a: str<1>, b: (u32, str<1>, str<2>)) -> u32 {
    let (_, _, _) = b;
    b.0
}
// Prover.toml
a = [[true, "v*"], [false, "f{"]]
b = "x"
active = false
index = 1

This returns "\u{1}v" on the default compilation flow but with --force-brillig it returns "v*"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions