Closed Bug 1635933 Opened 5 months ago Closed 4 months ago

clang 10 hangs compiling lz4hc.c

Categories

(Firefox Build System :: Toolchains, defect, P3)

defect

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: dmajor, Assigned: dmajor)

References

Details

Attachments

(1 file)

So far only seen on the linux64-asan/opt build (which, importantly, also enables ubsan; this didn't repro for me locally with asan alone).

Only happens with the new pass manager.

I think it has something to do with the loop in LICM.cpp's sink() but I still need to poke at this some more in order to form a more coherent report.

Priority: -- → P3

creduce is incredible.

char a;
b(*c) { c + 1; }
static d(char *c, f) {
  while (f) {
    int *g = &a + 65535 >= c ? &a : c - 65535;
    b(g);
  }
}
h() {
  int e;
  while (1)
    d(&e, h);
}

Reduced command line:

clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -fsanitize=pointer-overflow -fexperimental-new-pass-manager reduced.c -O1

ubsan's generated code trips an optimization corner case in clang 10. This is a short-term workaround. In the best case, llvm.org/pr45835 will land a fix soon, and we can merge that for our clang-10 update and not even land this patch. However, in case we're living in anything other than the best case world, I don't want to block on that happening.

Assignee: nobody → dmajor
Status: NEW → ASSIGNED
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5695aa933c38
Temporarily disable new pass manager on ubsan clang-10 r=froydnj

Backed out for reftest perma failures.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1616692#c9.

Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1cbb32ff7bf7
Temporarily disable new pass manager on ubsan clang-10 r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.