New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 24371 - Assert failure compiling blender 2.75
Summary: Assert failure compiling blender 2.75
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: LLVM Codegen (show other bugs)
Version: 3.7
Hardware: PC FreeBSD
: P normal
Assignee: Alexey Bataev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-05 23:18 PDT by Shane
Modified: 2015-08-14 07:26 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
clang 3.7/blender 2.75 build log (191.56 KB, text/x-log)
2015-08-05 23:18 PDT, Shane
Details
BLI_kdopbvh-8090d7.sh (4.31 KB, application/x-shellscript)
2015-08-05 23:19 PDT, Shane
Details
BLI_kdopbvh-8090d7.c (516.60 KB, text/x-csrc)
2015-08-05 23:19 PDT, Shane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shane 2015-08-05 23:18:08 PDT
Created attachment 14697 [details]
clang 3.7/blender 2.75 build log

I am running FreeBSD 10-stable and have just installed clang 3.7 from ports, after setting CC=clang37 etc in make.conf and trying to compile graphics/blender (2.75) I get an assertion failed error

Assertion failed: (!DMEntry && "Decl already exists in localdeclmap!"), function EmitAutoVarAlloca, file /wrkdirs/usr/ports/devel/llvm37/work/llvm-3.7.0rc1.src/tools/clang/lib/CodeGen/CGDecl.cpp, line 1016.

% uname -a
FreeBSD leader.local 10.2-PRERELEASE FreeBSD 10.2-PRERELEASE #16 r285937: Tue Jul 28 20:58:13 ACST 2015     root@leader.local:/usr/obj/usr/src/sys/GENERIC  amd64

% clang37 --version
clang version 3.7.0 (tags/RELEASE_370/rc1)
Target: x86_64-unknown-freebsd10.2
Thread model: posix

I have also tried with devel/llvm-devel
% clang-devel --version
clang version 3.8.0 
Target: x86_64-unknown-freebsd10.2
Thread model: posix

debug files for both are available at http://shaneware.biz/freebsddebugdata/clang-debug
Comment 1 Shane 2015-08-05 23:19:38 PDT
Created attachment 14698 [details]
BLI_kdopbvh-8090d7.sh
Comment 2 Shane 2015-08-05 23:19:56 PDT
Created attachment 14699 [details]
BLI_kdopbvh-8090d7.c
Comment 3 Hans Wennborg 2015-08-11 12:08:34 PDT
Reduced a bit:

$ clang -cc1 -triple x86_64-unknown-freebsd10.2 -emit-obj -fopenmp a.i

typedef struct BVHTree BVHTree;
typedef struct BVHTreeOverlap {
} BVHTreeOverlap;
typedef struct BVHNode { char totnode; } BVHNode;
struct BVHTree {
  BVHNode **nodes;
  int totleaf;
  char tree_type;
} BVHOverlapData;
BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2,
                                    unsigned int *r_overlap_tot) {
  int j;
#pragma omp parallel for private(j) schedule(static) if (tree1->totleaf > 1024)
  for (j = 0; j < __extension__({
                    typeof(tree1->tree_type) a_ = (tree1->tree_type);
                    typeof(tree1->nodes[tree1->totleaf]->totnode) b_ =
                        (tree1->nodes[tree1->totleaf]->totnode);
                    ((a_) < (b_) ? (a_) : (b_));
                  });
       j++) {
  }
}
Comment 4 Alexey Bataev 2015-08-14 07:26:14 PDT
Fixed in revision 245041.