Assertion failed: ((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"), function computeKnownBits, file /usr/src/contrib/llvm/lib/Analysis/ValueTracking.cpp, line 1594. cc: error: unable to execute command: Abort trap cc: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 4.0.0 (branches/release_40 293443) (based on LLVM 4.0.0) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin http://package18.nyi.freebsd.org/data/headamd64PR216008-default/2017-01-29_16h09m05s/logs/errors/emacs-devel-26.0.50.20170121,2.log
Created attachment 179444 [details] src/buffer.c (preprocessed, compressed)
Created attachment 179445 [details] command line args (for clang 4.0)
Reproduced, test case submitted in upstream bug: https://llvm.org/bugs/show_bug.cgi?id=31809
A commit references this bug: Author: dim Date: Thu Feb 2 23:01:30 UTC 2017 New revision: 313110 URL: https://svnweb.freebsd.org/changeset/base/313110 Log: Pull in r293773 from upstream llvm trunk (by Sanjay Patel): [ValueTracking] avoid crashing from bad assumptions (PR31809) A program may contain llvm.assume info that disagrees with other analysis. This may be caused by UB in the program, so we must not crash because of that. As noted in the code comments: https://llvm.org/bugs/show_bug.cgi?id=31809 ...we can do better, but this at least avoids the assert/crash in the bug report. Differential Revision: https://reviews.llvm.org/D29395 This fixes an assertion when building editors/emacs-devel. PR: 216614 Changes: projects/clang400-import/contrib/llvm/lib/Analysis/ValueTracking.cpp
Should be fixed now. Note that upstream has indicated that what emacs is doing is most likely some undefined behavior, so please take care. I have built emacs-devel with this fix, and it seems to work OK, with light testing (both in a terminal, and as an X client).