AnsweredAssumed Answered

printf("") giving segmentation fault

Question asked by gautam.himanshu on Jul 19, 2012
Latest reply on Jul 19, 2012 by heman

Hi AMD,

My system specification is: Intel i3 sandybridge CPU, HD 7970 GPU, Ubuntu 12.04 OS

Device OpenCL C version:                       OpenCL C 1.2

  Driver version:                                CAL 1.4.1720 (VM)

  Profile:                                       FULL_PROFILE

  Version:                                       OpenCL 1.2 AMD-APP (923.1)

It may not be a serious issue, but it certainly is annoying.

 

Here is the backtrace when i ran it on CPU:

Program received signal SIGSEGV, Segmentation fault.

0x00007ffff613809b in llvm::ConstantArray::isString() const () from /usr/lib/libamdocl64.so

(gdb) bt

#0  0x00007ffff613809b in llvm::ConstantArray::isString() const () from /usr/lib/libamdocl64.so

#1  0x00007ffff59ad1e6 in (anonymous namespace)::AMDILPrintfConvert::expandPrintf(llvm::ilist_iterator<llvm::Instruction>*) ()

   from /usr/lib/libamdocl64.so

#2  0x00007ffff59acd24 in (anonymous namespace)::AMDILPrintfConvert::runOnFunction(llvm::Function&) () from /usr/lib/libamdocl64.so

#3  0x00007ffff61dc630 in llvm::FPPassManager::runOnFunction(llvm::Function&) () from /usr/lib/libamdocl64.so

#4  0x00007ffff61dc742 in llvm::FunctionPassManagerImpl::run(llvm::Function&) () from /usr/lib/libamdocl64.so

#5  0x00007ffff61dc8d9 in llvm::FunctionPassManager::run(llvm::Function&) () from /usr/lib/libamdocl64.so

#6  0x00007ffff5482812 in amd::CompilerImpl::llvmCodeGen(llvm::Module*, std::string&, amd::CompilerTargetInfo&, llvm::JunkJITBinary**) () from /usr/lib/libamdocl64.so

#7  0x00007ffff5486e18 in amd::CompilerImpl::llvmLinkOptCG(std::string&, std::string&, amd::CompilerTargetInfo&, llvm::JunkJITBinary**) () from /usr/lib/libamdocl64.so

#8  0x00007ffff54c3f37 in gpu::NullProgram::compileBinaryToIL(amd::option::Options*) () from /usr/lib/libamdocl64.so

#9  0x00007ffff54e769c in gpu::NullProgram::linkImpl(amd::option::Options*) () from /usr/lib/libamdocl64.so

#10 0x00007ffff548ed3e in device::Program::build(std::string const&, char const*, amd::option::Options*) ()

   from /usr/lib/libamdocl64.so

#11 0x00007ffff549c338 in amd::Program::build(std::vector<amd::Device*, std::allocator<amd::Device*> > const&, char const*, void (*)(_cl_program*, void*), void*, bool) () from /usr/lib/libamdocl64.so

#12 0x00007ffff547d5e7 in clBuildProgram () from /usr/lib/libamdocl64.so

Outcomes