X server found. dri2 connection failed! X server found. dri2 connection failed! X server found. dri2 connection failed! X server found. dri2 connection failed! X server found. dri2 connection failed! X server found. dri2 connection failed! ================================================================= ==10909==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60a000000080 at pc 0x0000004bb431 bp 0x7fffc37b3990 sp 0x7fffc37b3140 READ of size 16 at 0x60a000000080 thread T0 #0 0x4bb430 in __asan_memcpy (/home/xxx/beignet/build-asan/utests/utest_run+0x4bb430) #1 0x7f28d4229036 in gbe::SelGlobalImmMovOpt::run() /home/xxx/beignet/build-asan/../backend/src/backend/gen_insn_selection_optimize.cpp:621:28 #2 0x7f28d42295a3 in gbe::Selection::optimize() /home/xxx/beignet/build-asan/../backend/src/backend/gen_insn_selection_optimize.cpp:653:12 #3 0x7f28d45c87a7 in gbe::GenContext::emitCode() /home/xxx/beignet/build-asan/../backend/src/backend/gen_context.cpp:3659:12 #4 0x7f28d3b27678 in gbe::Context::compileKernel() /home/xxx/beignet/build-asan/../backend/src/backend/context.cpp:385:15 #5 0x7f28d4717bc5 in gbe::GenProgram::compileKernel(gbe::ir::Unit const&, std::__cxx11::basic_string, std::allocator > const&, bool, int) /home/xxx/beignet/build-asan/../backend/src/backend/gen_program.cpp:235:21 #6 0x7f28d3b51f89 in gbe::Program::buildFromUnit(gbe::ir::Unit const&, std::__cxx11::basic_string, std::allocator >&) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:165:30 #7 0x7f28d3b517f3 in gbe::Program::buildFromLLVMModule(void const*, std::__cxx11::basic_string, std::allocator >&, int) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:141:17 #8 0x7f28d47218ad in gbe::genProgramNewFromLLVM(unsigned int, void const*, void const*, char const*, unsigned long, char*, unsigned long*, int, char const*) /home/xxx/beignet/build-asan/../backend/src/backend/gen_program.cpp:488:18 #9 0x7f28d3b5b88b in gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:1075:11 #10 0x7f28da33b5b1 in cl_program_build /home/xxx/beignet/build-asan/../src/cl_program.c:597:17 #11 0x7f28da3006ba in clBuildProgram /home/xxx/beignet/build-asan/../src/cl_api.c:842:13 #12 0x7f28da37932c in cl_self_test /home/xxx/beignet/build-asan/../src/cl_device_id.c:879:18 #13 0x7f28da379cb5 in cl_get_device_ids /home/xxx/beignet/build-asan/../src/cl_device_id.c:934:28 #14 0x7f28da307e72 in clGetDeviceIDs /home/xxx/beignet/build-asan/../src/cl_api_device_id.c:43:10 #15 0x7f28da856d79 in cl_ocl_init() /home/xxx/beignet/build-asan/../utests/utest_helper.cpp:460:5 #16 0x50e869 in main /home/xxx/beignet/build-asan/../utests/utest_run.cpp:64:7 #17 0x7f28d8010509 in __libc_start_main (/lib64/libc.so.6+0x20509) #18 0x41ad99 in _start (/home/xxx/beignet/build-asan/utests/utest_run+0x41ad99) 0x60a000000080 is located 0 bytes to the right of 64-byte region [0x60a000000040,0x60a000000080) allocated by thread T0 here: #0 0x4d0a78 in __interceptor_memalign.localalias.1 (/home/xxx/beignet/build-asan/utests/utest_run+0x4d0a78) #1 0x7f28d37c8357 in gbe::alignedMalloc(unsigned long, unsigned long) /home/xxx/beignet/build-asan/../backend/src/sys/alloc.cpp:285:17 #2 0x7f28d37c85b3 in gbe::LinearAllocator::Segment::Segment(unsigned long) /home/xxx/beignet/build-asan/../backend/src/sys/alloc.cpp:306:34 #3 0x7f28d37c8a27 in gbe::LinearAllocator::LinearAllocator(unsigned long, unsigned long) /home/xxx/beignet/build-asan/../backend/src/sys/alloc.cpp:316:18 #4 0x7f28d3eaf538 in gbe::Selection::Opaque::Opaque(gbe::GenContext&) /home/xxx/beignet/build-asan/../backend/src/backend/gen_insn_selection.cpp:908:22 #5 0x7f28d3eed535 in gbe::Selection::Selection(gbe::GenContext&) /home/xxx/beignet/build-asan/../backend/src/backend/gen_insn_selection.cpp:2767:20 #6 0x7f28d3eed846 in gbe::Selection8::Selection8(gbe::GenContext&) /home/xxx/beignet/build-asan/../backend/src/backend/gen_insn_selection.cpp:2777:45 #7 0x7f28d45ef64c in gbe::Gen8Context::newSelection() /home/xxx/beignet/build-asan/../backend/src/backend/gen8_context.cpp:51:17 #8 0x7f28d43345fc in gbe::GenContext::startNewCG(unsigned int, unsigned int, bool) /home/xxx/beignet/build-asan/../backend/src/backend/gen_context.cpp:74:11 #9 0x7f28d4717bb9 in gbe::GenProgram::compileKernel(gbe::ir::Unit const&, std::__cxx11::basic_string, std::allocator > const&, bool, int) /home/xxx/beignet/build-asan/../backend/src/backend/gen_program.cpp:234:12 #10 0x7f28d3b51f89 in gbe::Program::buildFromUnit(gbe::ir::Unit const&, std::__cxx11::basic_string, std::allocator >&) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:165:30 #11 0x7f28d3b517f3 in gbe::Program::buildFromLLVMModule(void const*, std::__cxx11::basic_string, std::allocator >&, int) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:141:17 #12 0x7f28d47218ad in gbe::genProgramNewFromLLVM(unsigned int, void const*, void const*, char const*, unsigned long, char*, unsigned long*, int, char const*) /home/xxx/beignet/build-asan/../backend/src/backend/gen_program.cpp:488:18 #13 0x7f28d3b5b88b in gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:1075:11 #14 0x7f28da33b5b1 in cl_program_build /home/xxx/beignet/build-asan/../src/cl_program.c:597:17 #15 0x7f28da3006ba in clBuildProgram /home/xxx/beignet/build-asan/../src/cl_api.c:842:13 #16 0x7f28da37932c in cl_self_test /home/xxx/beignet/build-asan/../src/cl_device_id.c:879:18 #17 0x7f28da379cb5 in cl_get_device_ids /home/xxx/beignet/build-asan/../src/cl_device_id.c:934:28 #18 0x7f28da307e72 in clGetDeviceIDs /home/xxx/beignet/build-asan/../src/cl_api_device_id.c:43:10 #19 0x7f28da856d79 in cl_ocl_init() /home/xxx/beignet/build-asan/../utests/utest_helper.cpp:460:5 #20 0x50e869 in main /home/xxx/beignet/build-asan/../utests/utest_run.cpp:64:7 #21 0x7f28d8010509 in __libc_start_main (/lib64/libc.so.6+0x20509) SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/xxx/beignet/build-asan/utests/utest_run+0x4bb430) in __asan_memcpy Shadow bytes around the buggy address: 0x0c147fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c147fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c147fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c147fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c147fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 =>0x0c147fff8010:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c147fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c147fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c147fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c147fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c147fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb X server found. dri2 connection failed! X server found. dri2 connection failed! X server found. dri2 connection failed! platform number 1 platform_profile "FULL_PROFILE" platform_name "Intel Gen OCL Driver" platform_vendor "Intel" platform_version "OpenCL 1.2 beignet 1.4 (git-afd050f6)" platform_extensions "cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_intel_subgroups_short cl_intel_media_block_io cl_intel_planar_yuv cl_khr_gl_sharing" device_profile "FULL_PROFILE" device_name "Intel(R) HD Graphics 6000 BroadWell U-Processor GT3" device_vendor "Intel" device_version "OpenCL 1.2 beignet 1.4 (git-afd050f6)" device_extensions "cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_intel_subgroups_short cl_intel_media_block_io cl_intel_planar_yuv cl_khr_gl_sharing cl_khr_fp16" device_opencl_c_version "OpenCL C 1.2 beignet 1.4 (git-afd050f6)" 27 image formats are supported [CL_R CL_UNORM_INT8] [CL_R CL_UNORM_INT16] [CL_R CL_SIGNED_INT8] [CL_R CL_SIGNED_INT16] [CL_R CL_SIGNED_INT32] [CL_R CL_UNSIGNED_INT8] [CL_R CL_UNSIGNED_INT16] [CL_R CL_UNSIGNED_INT32] [CL_R CL_HALF_FLOAT] [CL_R CL_FLOAT] [CL_RG CL_UNORM_INT8] [CL_RG CL_UNORM_INT16] [CL_RG CL_UNSIGNED_INT8] [CL_RG CL_UNSIGNED_INT16] [CL_RGBA CL_UNORM_INT8] [CL_RGBA CL_UNORM_INT16] [CL_RGBA CL_SIGNED_INT8] [CL_RGBA CL_SIGNED_INT16] [CL_RGBA CL_SIGNED_INT32] [CL_RGBA CL_UNSIGNED_INT8] [CL_RGBA CL_UNSIGNED_INT16] [CL_RGBA CL_UNSIGNED_INT32] [CL_RGBA CL_HALF_FLOAT] [CL_RGBA CL_FLOAT] [CL_BGRA CL_UNORM_INT8] [CL_sRGBA CL_UNORM_INT8] [CL_sBGRA CL_UNORM_INT8] compiler_subgroup_media_block_read_us2()================================================================= ==10909==ERROR: AddressSanitizer: heap-use-after-free on address 0x6080000e11e8 at pc 0x7f28d3c9fe7f bp 0x7fffc37a1c90 sp 0x7fffc37a1c88 READ of size 4 at 0x6080000e11e8 thread T0 #0 0x7f28d3c9fe7e in gbe::ir::Immediate::getIntegerValue() const /home/xxx/beignet/build-asan/../backend/src/./ir/immediate.hpp:179:15 #1 0x7f28d3c9fe7e in gbe::GenWriter::emitBlockReadWriteImageInst(llvm::CallInst&, llvm::CallSite&, bool, unsigned char, gbe::ir::Type) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:4635 #2 0x7f28d3d30590 in gbe::GenWriter::emitCallInst(llvm::CallInst&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:5678:19 #3 0x7f28d3dcaa3a in gbe::GenWriter::visitCallInst(llvm::CallInst&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:728:5 #4 0x7f28d3dca802 in llvm::InstVisitor::delegateCallInst(llvm::CallInst&) /usr/include/llvm/IR/InstVisitor.h:281:5 #5 0x7f28d3dc95dc in llvm::InstVisitor::visitCall(llvm::CallInst&) /usr/include/llvm/IR/Instruction.def:186:1 #6 0x7f28d3d577d0 in llvm::InstVisitor::visit(llvm::Instruction&) /usr/include/llvm/IR/Instruction.def:186:1 #7 0x7f28d3c0d989 in gbe::GenWriter::emitBasicBlock(llvm::BasicBlock*) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:2044:7 #8 0x7f28d3c3499c in gbe::GenWriter::emitFunction(llvm::Function&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:3240:7 #9 0x7f28d3d6adb1 in gbe::GenWriter::runOnFunction(llvm::Function&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:633:7 #10 0x7f28cd73a5c7 in llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib64/libLLVM-4.0.so+0x7735c7) #11 0x7f28ce22e397 (/lib64/libLLVM-4.0.so+0x1267397) #12 0x7f28cd739e5e in llvm::legacy::PassManagerImpl::run(llvm::Module&) (/lib64/libLLVM-4.0.so+0x772e5e) #13 0x7f28d3e8023f in gbe::llvmToGen(gbe::ir::Unit&, void const*, int, bool, int, std::__cxx11::basic_string, std::allocator >&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_to_gen.cpp:395:12 #14 0x7f28d3b516ad in gbe::Program::buildFromLLVMModule(void const*, std::__cxx11::basic_string, std::allocator >&, int) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:127:9 #15 0x7f28d47218ad in gbe::genProgramNewFromLLVM(unsigned int, void const*, void const*, char const*, unsigned long, char*, unsigned long*, int, char const*) /home/xxx/beignet/build-asan/../backend/src/backend/gen_program.cpp:488:18 #16 0x7f28d3b5b88b in gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) /home/xxx/beignet/build-asan/../backend/src/backend/program.cpp:1075:11 #17 0x7f28da33b5b1 in cl_program_build /home/xxx/beignet/build-asan/../src/cl_program.c:597:17 #18 0x7f28da3006ba in clBuildProgram /home/xxx/beignet/build-asan/../src/cl_api.c:842:13 #19 0x7f28da85335d in cl_kernel_init(char const*, char const*, int, char const*) /home/xxx/beignet/build-asan/../utests/utest_helper.cpp:269:5 #20 0x7f28daf7c811 in void subgroup_generic_media(unsigned short*, unsigned short*, unsigned long, char const*) /home/xxx/beignet/build-asan/../utests/compiler_subgroup_media_block_read.cpp:94:3 #21 0x7f28daf7e685 in compiler_subgroup_media_block_read_us2() /home/xxx/beignet/build-asan/../utests/compiler_subgroup_media_block_read.cpp:192:1 #22 0x7f28daf7e77b in __ANON__compiler_subgroup_media_block_read_us2__() /home/xxx/beignet/build-asan/../utests/compiler_subgroup_media_block_read.cpp:192:1 #23 0x7f28da84792c in UTest::do_run(UTest) /home/xxx/beignet/build-asan/../utests/utest.cpp:166:3 #24 0x7f28da847da8 in UTest::run(char const*) /home/xxx/beignet/build-asan/../utests/utest.cpp:177:7 #25 0x50ea07 in main /home/xxx/beignet/build-asan/../utests/utest_run.cpp:83:11 #26 0x7f28d8010509 in __libc_start_main (/lib64/libc.so.6+0x20509) #27 0x41ad99 in _start (/home/xxx/beignet/build-asan/utests/utest_run+0x41ad99) 0x6080000e11e8 is located 72 bytes inside of 96-byte region [0x6080000e11a0,0x6080000e1200) freed by thread T0 here: #0 0x4d0228 in __interceptor_free.localalias.0 (/home/xxx/beignet/build-asan/utests/utest_run+0x4d0228) #1 0x7f28d37c823f in gbe::memFree(void*) /home/xxx/beignet/build-asan/../backend/src/sys/alloc.cpp:230:46 #2 0x7f28d3a142df in gbe::Allocator::deallocate(gbe::ir::Immediate*, unsigned long) /home/xxx/beignet/build-asan/../backend/src/./sys/alloc.hpp:155:9 #3 0x7f28d3a142df in std::allocator_traits >::deallocate(gbe::Allocator&, gbe::ir::Immediate*, unsigned long) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/alloc_traits.h:328 #4 0x7f28d3a1425a in std::_Vector_base >::_M_deallocate(gbe::ir::Immediate*, unsigned long) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/stl_vector.h:180:4 #5 0x7f28d3ab74e4 in void std::vector >::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, gbe::ir::Immediate const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/vector.tcc:448:7 #6 0x7f28d3ab6dbd in std::vector >::push_back(gbe::ir::Immediate const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/stl_vector.h:948:4 #7 0x7f28d3c017cb in gbe::ir::Function::newImmediate(gbe::ir::Immediate const&) /home/xxx/beignet/build-asan/../backend/src/./ir/function.hpp:372:24 #8 0x7f28d3c017cb in gbe::ir::ImmediateIndex gbe::ir::Context::newImmediate(unsigned int) /home/xxx/beignet/build-asan/../backend/src/./ir/context.hpp:71 #9 0x7f28d3c017cb in gbe::GenWriter::processConstantImmIndexImpl(llvm::Constant*, int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1840 #10 0x7f28d3bfb581 in gbe::GenWriter::processConstantImmIndex(llvm::Constant*, int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1912:14 #11 0x7f28d3c082bc in gbe::GenWriter::processConstantImm(llvm::Constant*, int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1919:35 #12 0x7f28d3c9fdfe in gbe::GenWriter::emitBlockReadWriteImageInst(llvm::CallInst&, llvm::CallSite&, bool, unsigned char, gbe::ir::Type) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:4633:37 #13 0x7f28d3d30590 in gbe::GenWriter::emitCallInst(llvm::CallInst&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:5678:19 #14 0x7f28d3dcaa3a in gbe::GenWriter::visitCallInst(llvm::CallInst&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:728:5 #15 0x7f28d3dca802 in llvm::InstVisitor::delegateCallInst(llvm::CallInst&) /usr/include/llvm/IR/InstVisitor.h:281:5 #16 0x7f28d3dc95dc in llvm::InstVisitor::visitCall(llvm::CallInst&) /usr/include/llvm/IR/Instruction.def:186:1 #17 0x7f28d3d577d0 in llvm::InstVisitor::visit(llvm::Instruction&) /usr/include/llvm/IR/Instruction.def:186:1 #18 0x7f28d3c0d989 in gbe::GenWriter::emitBasicBlock(llvm::BasicBlock*) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:2044:7 #19 0x7f28d3c3499c in gbe::GenWriter::emitFunction(llvm::Function&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:3240:7 #20 0x7f28d3d6adb1 in gbe::GenWriter::runOnFunction(llvm::Function&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:633:7 #21 0x7f28cd73a5c7 in llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib64/libLLVM-4.0.so+0x7735c7) previously allocated by thread T0 here: #0 0x4d03e0 in __interceptor_malloc (/home/xxx/beignet/build-asan/utests/utest_run+0x4d03e0) #1 0x7f28d37c8214 in gbe::memAlloc(unsigned long) /home/xxx/beignet/build-asan/../backend/src/sys/alloc.cpp:229:41 #2 0x7f28d3ab8001 in gbe::Allocator::allocate(unsigned long, void const*) /home/xxx/beignet/build-asan/../backend/src/./sys/alloc.hpp:149:26 #3 0x7f28d3ab8001 in std::allocator_traits >::allocate(gbe::Allocator&, unsigned long) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/alloc_traits.h:301 #4 0x7f28d3ab7df2 in std::_Vector_base >::_M_allocate(unsigned long) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/stl_vector.h:172:20 #5 0x7f28d3ab7056 in void std::vector >::_M_realloc_insert(__gnu_cxx::__normal_iterator > >, gbe::ir::Immediate const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/vector.tcc:406:33 #6 0x7f28d3ab6dbd in std::vector >::push_back(gbe::ir::Immediate const&) /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/stl_vector.h:948:4 #7 0x7f28d3c017cb in gbe::ir::Function::newImmediate(gbe::ir::Immediate const&) /home/xxx/beignet/build-asan/../backend/src/./ir/function.hpp:372:24 #8 0x7f28d3c017cb in gbe::ir::ImmediateIndex gbe::ir::Context::newImmediate(unsigned int) /home/xxx/beignet/build-asan/../backend/src/./ir/context.hpp:71 #9 0x7f28d3c017cb in gbe::GenWriter::processConstantImmIndexImpl(llvm::Constant*, int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1840 #10 0x7f28d3bfb581 in gbe::GenWriter::processConstantImmIndex(llvm::Constant*, int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1912:14 #11 0x7f28d3c085bb in gbe::GenWriter::newImmediate(llvm::Constant*, unsigned int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1924:12 #12 0x7f28d3c0c55b in gbe::GenWriter::getConstantRegister(llvm::Constant*, unsigned int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1980:47 #13 0x7f28d3c384d9 in gbe::GenWriter::getRegister(llvm::Value*, unsigned int) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:1992:14 #14 0x7f28d3c384d9 in gbe::GenWriter::emitBinaryOperator(llvm::Instruction&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:3293 #15 0x7f28d3dc9cea in gbe::GenWriter::visitBinaryOperator(llvm::Instruction&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:723:5 #16 0x7f28d3dc8dd7 in llvm::InstVisitor::visitAdd(llvm::BinaryOperator&) /usr/include/llvm/IR/Instruction.def:124:1 #17 0x7f28d3d573c8 in llvm::InstVisitor::visit(llvm::Instruction&) /usr/include/llvm/IR/Instruction.def:124:1 #18 0x7f28d3c0d989 in gbe::GenWriter::emitBasicBlock(llvm::BasicBlock*) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:2044:7 #19 0x7f28d3c3499c in gbe::GenWriter::emitFunction(llvm::Function&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:3240:7 #20 0x7f28d3d6adb1 in gbe::GenWriter::runOnFunction(llvm::Function&) /home/xxx/beignet/build-asan/../backend/src/llvm/llvm_gen_backend.cpp:633:7 #21 0x7f28cd73a5c7 in llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib64/libLLVM-4.0.so+0x7735c7) SUMMARY: AddressSanitizer: heap-use-after-free /home/xxx/beignet/build-asan/../backend/src/./ir/immediate.hpp:179:15 in gbe::ir::Immediate::getIntegerValue() const Shadow bytes around the buggy address: 0x0c10800141e0: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd 0x0c10800141f0: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd 0x0c1080014200: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00 0x0c1080014210: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa 0x0c1080014220: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd =>0x0c1080014230: fa fa fa fa fd fd fd fd fd fd fd fd fd[fd]fd fd 0x0c1080014240: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c1080014250: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c1080014260: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c1080014270: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c1080014280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==10909==ABORTING