<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64129>64129</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Segmentation fault for /llvm-test-suite/blob/main/Bitcode/Regression/fft/driver.cpp
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vishnuamd
</td>
</tr>
</table>
<pre>
### Used the below to run
https://github.com/llvm/llvm-test-suite/commits/main/Bitcode/Regression/fft/driver.cpp
### Error occurred with recent clang version
18.0.0 ([https://github.com/llvm/llvm-project.git 970569b6ccb071d32e67ed26e3b972141efd2c31](https://github.com/llvm/llvm-project.git%20970569b6ccb071d32e67ed26e3b972141efd2c31))
Dated: 26-Jul-2023
### lnt command
$ export ONLYTEST="--only-test Bitcode/Regression/fft/fft"
$ lnt runtest test-suite \
--sandbox ${SANDBOX_PATH} \
--cc clang \
--cxx clang++ \
--use-lit=${LLVM_LIT_PATH}/lit.py \
--use-cmake=${CMAKE_PATH}/bin/cmake \
--test-suite $TESTSUITE \
--cmake-cache Release \
--cxxflags="$CXXFLAGS" \
--cflags="$CFLAGS" lnt_benchmarks_stage \
--run-order=$RUNORDER \
--build-threads $BTHREADS \
--threads $RTHREADS \
--exec-multisample=1 \
--test-size large \
--cmake-define=TEST_SUITE_RUN_TYPE=ref $ONLYTEST \
--cmake-define=TEST_SUITE_HOST_CC:STRING=clang \
--cmake-define=RUNTIMELIMIT:NUMBER=3600
### Snip from console output
```
2023-07-26 18:05:16 INFO: Execute: /home/vishnu/llvm-project/llvm/utils/lit/lit.py -v -j 8 /home/vishnu/halide/sandbox_3/test-2023-07-26_12-34-55/Bitcode/Regression/fft -o /home/vishnu/halide/sandbox_3/test-2023-07-26_12-34-55/outputfjepumvb.json
-- Testing: 1 tests, 1 workers --
FAIL: test-suite :: Bitcode/Regression/fft/fft.test (1 of 1)
******************** TEST 'test-suite :: Bitcode/Regression/fft/fft.test' FAILED ********************
/home/vishnu/halide/sandbox_3/test-2023-07-26_12-34-55/tools/timeit-target --limit-core 0 --limit-cpu 7200 --timeout 7200 --limit-file-size 104857600 --limit-rss-size 838860800 --redirect-input /dev/null --chdir /home/vishnu/halide/sandbox_3/test-2023-07-26_12-34-55/Bitcode/Regression/fft --summary /home/vishnu/halide/sandbox_3/test-2023-07-26_12-34-55/Bitcode/Regression/fft/Output/fft.test.time /home/vishnu/halide/sandbox_3/test-2023-07-26_12-34-55/Bitcode/Regression/fft/fft
/home/vishnu/halide/sandbox_3/test-2023-07-26_12-34-55/tools/timeit-target: error: child terminated by signal 11
********************
********************
Failed Tests (1):
test-suite :: Bitcode/Regression/fft/fft.test
Testing Time: 0.11s
Failed: 1
Import succeeded.
=======================================================================
```
### Additional Info
1. Repository: https://github.com/llvm/llvm-test-suite.git
2. With default flags
3. Preliminary analysis:
In the header file **Bitcode/Regression/fft/halide_buffer.h**
**filters** array is defined with external function. The name is specified with the following format
**Format:** FftConvolve<B>{matrix}</B>{extra text}xCHalide,
**{matrix}**: Available matrix sizes are as follows:
8x8, 16x16, 32x32, 64x64, 128x128, 256x256
File: **Bitcode/Regression/fft/driver.cpp**
Function: **main**
Line: **53**
```cpp
for (int i = 0; i < 24; i++) {
filter f = filters[i];
f.fn(bufs + 0,
bufs + 1,
bufs + 2); //<-- A
}
```
In the above marked line A, when the filter âfâ with dimension *32,64,128,256* is accessed, **segmentation fault** is occurred.
The soruce code for the function pointing is not available, it is in byte code (*.bc).
According to the git log history, commit 58284af "[test-suite:Bitcode] Add fft (from Halide) as regression benchmark" is added in release/5.x and there is no change after wards.
Commit history: https://github.com/llvm/llvm-test-suite/commits/main/Bitcode/Regression/fft/driver.cpp
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWFtzozry_zTKSxcUCIPxQx7whTP5_zPJlOPsznlKCWhszQjkkoTj7KffksCXODkzZ2Z29mFTlAPqlvr-U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