<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62667>62667</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Crash reproducer for Ubuntu clang version 15.0.7
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
r-devulap
</td>
</tr>
</table>
<pre>
Encountered a segmentation fault when compiling a source file with clang 15.0.7 (see https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58686). Contents of the script and cpp files are here:
`/tmp/simd_qsort_16bit-e59e9c.sh` -> https://gist.github.com/r-devulap/b8184c93067dd0fbf7495adae38daf51
`/tmp/simd_qsort_16bit-e59e9c.cpp` -> https://gist.github.com/r-devulap/da477e01bee5e0184c719c57434dcbcc
```
0. Program arguments: clang++-15 -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/raghuveer/anaconda3/envs/np-dev/include -I/home/raghuveer/
anaconda3/envs/np-dev/include -fPIC -O2 -isystem /home/raghuveer/anaconda3/envs/np-dev/include -fPIC -ftrapping-math -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFS
ET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DHAVE_CBLAS -Ibuild/src.linux-x86_64-3.9/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-3.9/numpy/core/src/commo
n -Ibuild/src.linux-x86_64-3.9/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/core/include/numpy -Ibuild/src.linux-x86_64-3.9/numpy/distutils/in
clude -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npysort -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/c
ore/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/home/raghuveer/anaconda3/envs/np-dev/include/python3.9 -Ibuild/src.linux-x86_64-3.9/numpy/core/src/common -Ib
uild/src.linux-x86_64-3.9/numpy/core/src/npymath -c build/src.linux-x86_64-3.9/numpy/core/src/npysort/simd_qsort_16bit.dispatch.avx512_spr.cpp -o build/temp.linux-x86_64-3.9/
build/src.linux-x86_64-3.9/numpy/core/src/npysort/simd_qsort_16bit.dispatch.avx512_spr.o -MMD -MF build/temp.linux-x86_64-3.9/build/src.linux-x86_64-3.9/numpy/core/src/npysor
t/simd_qsort_16bit.dispatch.avx512_spr.o.d -std=c++17 -fno-threadsafe-statics -D__STDC_VERSION__=0 -fno-exceptions -fno-rtti -O3 -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt
-msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512vnni -mavx512ifma -mavx512vbmi -mavx512vbmi2 -mavx512bitalg -mavx51
2vpopcntdq -mavx512fp16
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. numpy/core/src/npysort/x86-simd-sort/src/avx512fp16-16bit-qsort.hpp:117:30: Generating code for declaration 'replace_nan_with_inf'
4. numpy/core/src/npysort/x86-simd-sort/src/avx512fp16-16bit-qsort.hpp:123:25: LLVM IR generation of compound statement ('{}')
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x31)[0x7f486070b3b1]
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x7f48607090fe]
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0x101)[0x7f486070a771]
/usr/lib/llvm-15/bin/../lib/libLLVM-15.so.1(+0xe2767f)[0x7f486062e67f]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f485f2c8520]
/usr/lib/llvm-15/bin/../lib/libclang-cpp.so.15(_ZN5clang7CodeGen15CodeGenFunction21EmitAMDGPUBuiltinExprEjPKNS_8CallExprE+0x703)[0x7f48681c45f3]
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Ubuntu clang version 15.0.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/simd_qsort_16bit-e59e9c.cpp
clang: note: diagnostic msg: /tmp/simd_qsort_16bit-e59e9c.sh
clang: note: diagnostic msg:
********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8WF9zozgS_zTKiwoKhAH7IQ_-R-K6JE7Fnp3afaGE1NjaA4mVhMeZT38l5DiZmexNNpO7VAojdav7161W0y1qjNhJgEuUzlC6uKC93St9qQMOh76h3UWl-OPlUjLVSwsaOKbYwK4FaakVSuKa9o3FX_YgMVNtJxohd45H9ZoBrkUD-Iuwe8waKnc4TsMozDEiYwOA99Z2BiVTRApEiqrfmZDttWpF34ZK7xApOkQKZUxQ91-_IlIIY3owiBQcLBUNSgrBUbJIx9k4Q2QS4rmSFqQ1WNXY7gEbpkVnMZUcs64b4BhMNeA9aEDJFKNogaLp6ZlFiBS2dUqNaHn5l1HalnFWCRtAOoEJC80eZREOULL8Dv1OGBvuhN33VchUi0hx9qGzbRyPR2ySRFnOeVRXdT6apJRTSMac1mn8dgCs696FgNNRnkMUVwApRA5NHk9Ymo-SEWcVY9844sdnFp3-h2EU4nutdpq2mOpd76LB4fCbjMgMkVkQpzj4LFXQy94ADzQYFyjBZxdvgQsVtw3B4m6xnH26wsGa4OAzbRoc1PeruR8L82gstBiRYq9acBbR3b4_AGhECiopU5LTBJEC5MGFheycxS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