Skip to content

segfault on rfactoring an RVar produced by fusing a Var with an RVar #7854

@abadams

Description

@abadams

This crashes:

#include "Halide.h"

using namespace Halide;

int main(int argc, char **argv) {
    Func f;
    RDom r(0, 100);
    Var x, y;
    f(x, y) = 0;
    f(x, y) += r;

    RVar yr;
    Var z;
    f.update().fuse(y, r, yr).rfactor(yr, z);

    return 0;
}

I believe the issue is that the rfactor code has to handle splits, but doesn't correctly handle fusing a Var with an RVar to produce an RVar. Also it doesn't do enough validation. This should be an internal assert failure rather than a crash.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions