From: bugzilla-daemon@freedesktop.org Subject: [Bug 105869] [amdgpu/llvm-5] clang crashes when compiling OpenCL kernel Date: Tue, 08 May 2018 00:31:27 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0446075895==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 284066E515 for ; Tue, 8 May 2018 00:31:27 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0446075895== Content-Type: multipart/alternative; boundary="15257394870.F5dB3dEC.28809" Content-Transfer-Encoding: 7bit --15257394870.F5dB3dEC.28809 Date: Tue, 8 May 2018 00:31:26 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D105869 Jan Vesely changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|clang crashes when |[amdgpu/llvm-5] clang |compiling OpenCL kernel |crashes when compiling | |OpenCL kernel --- Comment #11 from Jan Vesely --- Hi, sorry for the delay. I thought I replied weeks ago. I can reproduce the segfault on llvm-5 using the dump.link-0.ll: /usr/lib/llvm/5/bin/llc -march=3Damdgcn < ../dump.link-0.ll Since llvm-5 will not see any further changes you might try updating your libclc (plenty of changes recently), to see if it hides the bug. Linking the old compiled code with newer libclc did not seem to help: cd libclc; /usr/lib/llvm/5/bin/llvm-link ../dump.ll built_libs/tahiti-amdgcn-mesa-mesa3d.bc | /usr/lib/llvm/5/bin/llc still hits segfault. running clang-5.0 directly does not hit the issue: However, I cannot reproduce the error using clang-5.0: cd libclc; clang-5.0 -target amdgcn-mesa-mesa3d -Igeneric/include -Xclang -mlink-bitcode-file -Xclang built_libs/tahiti-amdgcn-mesa-mesa3d.bc -include clc/clc.h ../dump.cl -S -o - works OK! Unless I add '-g' to the command line, in which case it hits the same segfa= ult. I'd say this is a variant of https://bugs.freedesktop.org/show_bug.cgi?id=3D100218 I've also tried running the same command using llvm-6: clang-6.0 -g -target amdgcn-mesa-mesa3d -Igeneric/include -Xclang -mlink-bitcode-file -Xclang built_libs/tahiti-amdgcn-mesa-mesa3d.bc -include clc/clc.h ../dump.cl -S -o - and it does not segfault. I think the correct solution for you would be to upgrade to llvm-6. I'd consider this fixed in that case. --=20 You are receiving this mail because: You are the assignee for the bug.= --15257394870.F5dB3dEC.28809 Date: Tue, 8 May 2018 00:31:27 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated = Jan Vesely changed bug 10586= 9
What Removed Added
Summary clang crashes when compiling OpenCL kernel [amdgpu/llvm-5] clang crashes when compiling OpenCL kernel

Comme= nt # 11 on bug 10586= 9 from Jan Vesely
Hi,

sorry for the delay. I thought I replied weeks ago.

I can reproduce the segfault on llvm-5 using the dump.link-0.ll:
/usr/lib/llvm/5/bin/llc -march=3Damdgcn < ../dump.link-0.ll

Since llvm-5 will not see any further changes you might try updating your
libclc (plenty of changes recently), to see if it hides the bug.

Linking the old compiled code with newer libclc did not seem to help:
cd libclc;
/usr/lib/llvm/5/bin/llvm-link ../dump.ll
built_libs/tahiti-amdgcn-mesa-mesa3d.bc | /usr/lib/llvm/5/bin/llc
still hits segfault.

running clang-5.0 directly does not hit the issue:
However, I cannot reproduce the error using clang-5.0:
cd libclc;
clang-5.0 -target amdgcn-mesa-mesa3d -Igeneric/include -Xclang
-mlink-bitcode-file -Xclang built_libs/tahiti-amdgcn-mesa-mesa3d.bc -include
clc/clc.h ../dump.cl -S -o -
works OK!

Unless I add '-g' to the command line, in which case it hits the same segfa=
ult.

I'd say this is a variant of
https://bugs.freedesktop.org/show_bug.=
cgi?id=3D100218

I've also tried running the same command using llvm-6:
clang-6.0 -g -target amdgcn-mesa-mesa3d -Igeneric/include -Xclang
-mlink-bitcode-file -Xclang built_libs/tahiti-amdgcn-mesa-mesa3d.bc -include
clc/clc.h ../dump.cl -S -o -

and it does not segfault.

I think the correct solution for you would be to upgrade to llvm-6.
I'd consider this fixed in that case.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15257394870.F5dB3dEC.28809-- --===============0446075895== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0446075895==--