Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

r303385 + NewGVN cause build failure with LibreOffice #32372

Closed Quuxplusone closed 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR33400
Status RESOLVED WORKSFORME
Importance P normal
Reported by Luke (lukebenes@hotmail.com)
Reported on 2017-06-10 13:29:11 -0700
Last modified on 2017-09-13 23:15:10 -0700
Version trunk
Hardware PC Linux
CC dberlin@dberlin.org, ditaliano@apple.com, llvm-bugs@lists.llvm.org, stephan.bergmann.secondary@googlemail.com
Fixed by commit(s)
Attachments
Blocks PR30995
Blocked by
See also
After commit r303385, LibreOffice cannot be built with the NewGVN.

Steps to reproduce:
1. $ git clone git://anongit.freedesktop.org/libreoffice/core
2. $ apt-get build-dep libreoffice
3. create file autogen.input with CC=clang and CXX=clang++
4. ./autogen.sh && make ENVCFLAGS="-mllvm -enable-newgvn" ENVCFLAGSCXX="-mllvm -
enable-newgvn"

after r303385
build fails with CppunitTest_sal_rtl unit test failed
https://zerobin.net/?f4667d70234ecd9b#lGaFbWmTpcRE6N55nl8GPjAtNtIiWseiu1UGtfGA930=

after r303444

"constant.tests 47" expected FAILURE, got 1 (256): ok
Compiling: /workdir/CustomTarget/idlc/parser_test/in.idl
"constant.tests 48" expected FAILURE, got 0 (0): FAILED!
/idlc/CustomTarget_parser_test.mk:28: recipe for target
'/workdir/CustomTarget/idlc/parser_test.done' failed
make[1]: *** [/workdir/CustomTarget/idlc/parser_test.done] Error 1

As of r305145, clang is still failing the idlc/parser_test with the newgvn. A
normal clang build succeeds.
Quuxplusone commented 7 years ago

The build log of the CppunitTest/sal_rtl.test' failure:

https://zerobin.net/?84519a79a940f81d#gvjOvmkh7UsZD/bm2/NcIwgDKVXRjXWdTKFmjN6M0pU

The build log of the idlc/parser_test failure:

https://zerobin.net/?f4667d70234ecd9b#lGaFbWmTpcRE6N55nl8GPjAtNtIiWseiu1UGtfGA930

Quuxplusone commented 7 years ago
On Ubuntu 17.04 x86-64, clang version 6.0.0 (trunk 309197) is causing the same
idlc/parser_test error when NewGVN is enabled.

Daniel Berlin and Davide Italiano,

Any idea why these 2 commit might be causing the build failure?

http://llvm.org/viewvc/llvm-project?view=revision&revision=303385

[NewGVN] Replace predicate info leftovers.

AND

http://llvm.org/viewvc/llvm-project?view=revision&revision=303444

Last of the major pieces to NewGVN - yay!
NewGVN: Handle equivalence between phi of ops and op of phis.
Quuxplusone commented 7 years ago
Probably the one about phi-of-ops (the latter), as we haven't yet squashed all
the bugs in that area. Try to revert it and let us know if it works.

Thanks!

--
Davide
Quuxplusone commented 7 years ago
Davide Italiano,
I haven't tested lately, but when I tracked this bug down, reverting both
r303385 and r303444 fixed the failing unit tests. The failing test is an IDL
parser sanity check, so something is very likely now miscompiling. The failure
is the same, so I doubt anything has changed. Would it help you for me to
verify?
Quuxplusone commented 7 years ago

I'm actually pretty sure it won't be worth your time until i finish fixing the current set of phi of ops bugs.

Right now, it will definitely reuse loop values it should not :)

Quuxplusone commented 7 years ago
Daniel Berlin,
Not sure when this was fixed, but as of r312888, I can now build libreoffice
e6746a0 with the NewGVN. Thanks for all your hard work in cleaning up these
bugs.
Quuxplusone commented 7 years ago
FWIW: I still know of some complicated-to-trigger wrong code bugs for NewGVN.
So you may hit something again in the future (NewGVN has a lot more verifiers
than other passes, and the verifiers are very general, so catch many different
classes of bugs)

But so far, every bug y'all have hit has been a bug that Zhendong's fuzzing had
reported in another form, which is great ;)
Quuxplusone commented 7 years ago
(In reply to Luke from comment #6)
> Not sure when this was fixed, but as of r312888, I can now build libreoffice
> e6746a0 with the NewGVN.

(my LibreOffice NewGVN builds are still hit by bug 34473, though)