Skip to content

CMCLTranslatorTool crashes on any file from igc repository #218

Closed
@frantisekz

Description

@frantisekz

After working around #212 , I was able to get the CMCLTranslatorTool building, however, it is crashing on atempting to process any of the files during the compilation.

cd /builddir/build/BUILD/intel-graphics-compiler-igc-1.0.9389/redhat-linux-build/IGC/VectorCompiler/lib/BiF && /builddir/build/BUILD/intel-graphics-compiler-igc-1.0.9389/redhat-linux-build/IGC/Release/CMCLTranslatorTool -o VCBiFPrintfOCL32.cmcl.bc VCBiFPrintfOCL32.clang.bc
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /builddir/build/BUILD/intel-graphics-compiler-igc-1.0.9389/redhat-linux-build/IGC/Release/CMCLTranslatorTool -o VCBiFPrintfOCL32.cmcl.bc VCBiFPrintfOCL32.clang.bc
#0 0x00007fbd76783ae5 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM-13.so+0xb37ae5)
#1 0x00007fbd76781374 llvm::sys::RunSignalHandlers() (/lib64/libLLVM-13.so+0xb35374)
#2 0x00007fbd767842fd (/lib64/libLLVM-13.so+0xb382fd)
#3 0x00007fbd7584b740 __restore_rt (/lib64/libc.so.6+0x42740)

The same issue happens both with igc-1.0.9389 and igc-1.0.8744 .

I've tried removing all the hardening flags the Fedora adds to C/CXX flags, basically aligning with what ArchLinux uses by default, the result was same however.

The https://github.com/archlinux/svntogit-packages/blob/packages/llvm/trunk/don-t-accept-nullptr-as-GEP-element-type.patch seems to be already applied in Fedora llvm package.

I've applied just #210 on the igc source. The configure parameters are following:

%cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DIGC_OPTION__LLVM_PREFERRED_VERSION='13.0.0' \
    -DVC_INTRINSICS_SRC="%{_builddir}/vc-intrinsics-%{vc_commit}" \
    -DIGC_OPTION__ARCHITECTURE_TARGET='Linux64' \
    -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON \
    -DIGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_VC=ON \
    -DIGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_SC=OFF \
    -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds \
    -DIGC_OPTION__CLANG_MODE=Prebuilds \
    -DIGC_OPTION__LLD_MODE=Prebuilds \
    -DIGC_OPTION__LLVM_MODE=Prebuilds \
    -DINSTALL_GENX_IR=ON \
    -G Ninja \
    -Wno-dev

( -G Ninja doesn't make difference, just makes testing the build faster)

Entire build log is here:
build.log

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions