Created attachment 115815 [details] Offending OpenCL source. Notes are included within. I have a very interesting problem with Beignet 1.0 in that certain kernel definitions crash the build. The output of the build is: ASSERTION FAILED: con.getName() == v.getName() at file /builddir/build/BUILD/Beignet-1.0.0-Source/backend/src/llvm/llvm_gen_backend.cpp, function void gbe::GenWriter::allocateGlobalVariableRegister(llvm::Function&), line 1840 Here's the line of code at the current source: http://cgit.freedesktop.org/beignet/tree/backend/src/llvm/llvm_gen_backend.cpp#n1805 Not all kernel definitions produce this bug. Attached is one file of the code that fails.
Created attachment 115816 [details] C++ code that runs the given file.
Created attachment 115817 [details] clinfo output Running on a Fedora 20 system with kernel: 3.19.3-100.fc20.x86_64
Just upgraded to Fedora 21, now I get this instead: ASSERTION FAILED: scalarMap.find(key) != scalarMap.end() at file /builddir/build/BUILD/Beignet-1.0.1-Source/backend/src/llvm/llvm_gen_backend.cpp, function gbe::ir::Register gbe::RegisterTranslator::getScalar(llvm::Value*, uint32_t), line 407
hi Stojan Dimitrovski , please update the beignet to master and patch the link to have a try. http://lists.freedesktop.org/archives/beignet/2015-August/005971.html
Created attachment 118467 [details] Standalone-compilable version of above (.cl)
Created attachment 118468 [details] Standalone-compilable version of above (.c)
Created attachment 118469 [details] gdb traces
Created attachment 118470 [details] valgrind (memory error checker) log
The PrintfSlot fix *doesn't* fix this, at least for me (i5-3230M): see attached logs. (The original test case wasn't buildable without other files; it's very possible that my hurriedly-edited version isn't valid OpenCL C (and very likely that it no longer does anything useful), but that shouldn't crash the compiler. Removing the first __kernel still avoids the crash.) The several different places it can crash suggest memory corruption, but I haven't yet had time to properly look at the valgrind log.
This now appears to be fixed, probably by http://cgit.freedesktop.org/beignet/commit/?id=dcc189bed5b395d6fbcdffa29e60e68cf1071310
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.