From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 105869] clang crashes when compiling OpenCL kernel
Date: Tue, 03 Apr 2018 21:01:13 +0000 [thread overview]
Message-ID: <bug-105869-502@http.bugs.freedesktop.org/> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 3963 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105869
Bug ID: 105869
Summary: clang crashes when compiling OpenCL kernel
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: dri-devel@lists.freedesktop.org
Reporter: vedran@miletic.net
QA Contact: dri-devel@lists.freedesktop.org
(from #radeon and https://paste.debian.net/1018363/)
When compiling the following OpenCL kernel
kernel void PulseWave(global float* buffer, size_t num_harmonics,
float duty_cycle)
{
size_t index = get_global_id(0);
float phase = buffer[index];
float sample = duty_cycle;
float precompute1 = (phase - duty_cycle / 2.0) * 2.0 * M_PI;
for (size_t i = 1; i <= num_harmonics; ++i)
{
float harmonic = 2.0 / (i * M_PI) * sin(M_PI * i * duty_cycle)
*
cos(i * precompute1);
sample += harmonic;
}
buffer[index] = sample * 2.0 - 1.0;
}
Clang will crash with
Thread 1 "ftz_chiptune_pu" received signal SIGSEGV, Segmentation fault.
0x00007fffe6501ba1 in llvm::LiveRange::find(llvm::SlotIndex) () from
/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
(gdb) bt
#0 0x00007fffe6501ba1 in llvm::LiveRange::find(llvm::SlotIndex) () from
/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#1 0x00007fffe66674a1 in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#2 0x00007fffe66676c1 in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#3 0x00007fffe66697e5 in llvm::RegPressureTracker::getLiveThroughAt(unsigned
int, llvm::SlotIndex) const () from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#4 0x00007fffe6669af1 in
llvm::RegPressureTracker::recede(llvm::RegisterOperands const&,
llvm::SmallVectorImpl<llvm::RegisterMaskPair>*) ()
from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#5 0x00007fffe66a0229 in
llvm::ScheduleDAGInstrs::buildSchedGraph(llvm::AAResults*,
llvm::RegPressureTracker*, llvm::PressureDiffs*, llvm::LiveIntervals*, bool) ()
from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#6 0x00007fffe65e7653 in llvm::ScheduleDAGMILive::buildDAGWithRegPressure() ()
from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#7 0x00007fffe65e76b9 in llvm::ScheduleDAGMILive::schedule() () from
/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#8 0x00007fffe758e501 in llvm::GCNScheduleDAGMILive::schedule() () from
/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#9 0x00007fffe758e26e in llvm::GCNScheduleDAGMILive::finalizeSchedule() ()
from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#10 0x00007fffe65e6fa7 in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#11 0x00007fffe657cae0 in
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) () from
/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#12 0x00007fffe63deac8 in llvm::FPPassManager::runOnFunction(llvm::Function&)
() from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#13 0x00007fffe6fb7b50 in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#14 0x00007fffe63de3af in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
from /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1
#15 0x00007ffff42227ce in ?? () from
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1
#16 0x00007ffff4222ed0 in ?? () from
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1
#17 0x00007ffff421e6a7 in ?? () from
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1
#18 0x00007ffff420fea1 in ?? () from
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1
#19 0x00007ffff41efe02 in ?? () from
/usr/lib/x86_64-linux-gnu/libMesaOpenCL.so.1
#20 0x0000555555561129 in cl::Program::build (this=0x7fffffffde10, options=0x0,
notifyFptr=0x0, data=0x0) at /usr/include/CL/cl2.hpp:6321
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 5413 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2018-04-03 21:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 21:01 bugzilla-daemon [this message]
2018-04-03 21:02 ` [Bug 105869] clang crashes when compiling OpenCL kernel bugzilla-daemon
2018-04-04 20:15 ` bugzilla-daemon
2018-04-05 1:20 ` bugzilla-daemon
2018-04-05 12:40 ` bugzilla-daemon
2018-04-05 15:52 ` bugzilla-daemon
2018-04-05 22:00 ` bugzilla-daemon
2018-04-06 1:59 ` bugzilla-daemon
2018-04-06 18:29 ` bugzilla-daemon
2018-04-06 20:35 ` bugzilla-daemon
2018-04-06 20:36 ` bugzilla-daemon
2018-04-06 20:36 ` bugzilla-daemon
2018-05-08 0:31 ` [Bug 105869] [amdgpu/llvm-5] " bugzilla-daemon
2018-05-08 0:31 ` [Bug 105869] [amdgcn/llvm-5] " bugzilla-daemon
2018-05-09 9:26 ` bugzilla-daemon
2018-05-09 9:29 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-105869-502@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).