Bug 216195

Summary: Clang crash compiling qcad
Product: Base System Reporter: Poul-Henning Kamp <phk>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Unable to Reproduce    
Severity: Affects Only Me CC: dim
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Shell diags none

Description Poul-Henning Kamp freebsd_committer freebsd_triage 2017-01-17 22:48:22 UTC
Compiling QCAD from git:

Assertion failed: (idx < size()), function operator[], file /freebsd/src/contrib/llvm/include/llvm/ADT/SmallVector.h, line 145.
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 2017-01-17 22:49:14 UTC
Created attachment 179010 [details]
Shell diags
Comment 2 Poul-Henning Kamp freebsd_committer freebsd_triage 2017-01-17 22:51:07 UTC
I guess the other file is too big for the bugzilla, you can find it here instead:

http://phk.freebsd.dk/misc/REcmaHelper-f579ae.cpp.gz
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2017-01-18 10:08:38 UTC
Which version of clang is this, and on which FreeBSD branch?  I tried clang 3.6.0, 3.7.0, 3.7.1, 3.8.0, 3.9.0, 3.9.1 and 4.0.0, but your test case didn't crash with any of them...
Comment 4 Poul-Henning Kamp freebsd_committer freebsd_triage 2017-01-18 10:20:52 UTC
critter phk> uname -a
FreeBSD critter.freebsd.dk 12.0-CURRENT FreeBSD 12.0-CURRENT #3 r312219M: Sun Jan 15 17:34:54 UTC 2017     root@critter.freebsd.dk:/freebsd/obj/freebsd/src/sys/GENERIC  amd64

critter phk> cc -v
FreeBSD clang version 3.9.1 (tags/RELEASE_391/final 289601) (based on LLVM 3.9.1)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

It seems to have gone away for me as well after a make clean in the qcad source :-/
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2017-01-18 21:33:21 UTC
Let's blame it on cosmic rays, then. :)  If it becomes reproducible, please reopen this bug.