Skip to content

Commit 36c082a

Browse files
committed
try valgrind
1 parent fbddb78 commit 36c082a

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,27 @@ jobs:
127127
curl -L -O https://tiker.net/ci-support-v0
128128
. ./ci-support-v0
129129
build_py_project_in_conda_env
130+
131+
# Capture the heap-corrupting write directly with valgrind. The
132+
# Intel CPU OpenCL runtime corrupts the host heap during kernel
133+
# execution; faulthandler only shows where the corruption later
134+
# detonates (often in unrelated code), not the bad write itself.
135+
# valgrind traps the invalid write at the instant it happens, even
136+
# inside the closed-source libintelocl.so.
137+
#
138+
# - PYTHONMALLOC=malloc routes CPython allocations through libc so
139+
# valgrind isn't drowned in pymalloc false positives.
140+
# - --smc-check=all-non-file: the runtime JITs kernels into
141+
# non-file-backed memory; without it valgrind may run stale
142+
# translations of the generated code.
143+
sudo apt-get update && sudo apt-get install -y valgrind
144+
export PYTHONMALLOC=malloc
130145
export NO_COLOR=1
131-
python intel_crash_reproducer.py
146+
valgrind \
147+
--smc-check=all-non-file \
148+
--leak-check=no --errors-for-leak-kinds=none \
149+
--error-exitcode=1 \
150+
python intel_crash_reproducer.py
132151
133152
examples3:
134153
name: Examples Conda Py3

0 commit comments

Comments
 (0)