<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/88521>88521</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [mlir] [mlir-cpu-runner] Sometimes the llvm global string access gives segmentation fault
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          avithemad
      </td>
    </tr>
</table>

<pre>
    `cat ../mlir.txt | ../../../../build/bin/mlir-cpu-runner -e main -entry-point-result=void -shared-libs=../../../../build/lib/libmlir_runner_utils.so,../../../../mlir/include/mlir/ExecutionEngine/libsrunner.so`

I have provided a mlir.txt which contains the lowered llvm code, when I run it wil mlir cpu runner, with my own library 

[samplerunner.txt](https://github.com/llvm/llvm-project/files/14960246/samplerunner.txt)


I have also provided the library cpp file in txt format which can be compiler to shared library with command
`g++ -c -fPIC samplerunner.cpp -o samplerunner.o && g++ samplerunner.o -shared -o libsrunner.so `
[mlir.txt](https://github.com/llvm/llvm-project/files/14960217/mlir.txt)
Please change the extension to cpp.


My doubt is it because of the llvm global string declarations?
I did see a similar issue https://groups.google.com/g/llvm-dev/c/CFKmw04Lc8A/m/kfZ1DhW_BQAJ
but not sure could someone please help?

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE2vqzYQ_TXOZgQCBwgsWLzcPKTbD-lVXVTq5srYA7g1NvJHcvPvK0OS-_HaSpW6sSNnZs6cc4ZhzslRI7akPJLytGPBT8a27Cz9hDMTu96Ia0uqjDMPaUpoNytpU__qgRyetpdPRx-kEvGW-hae8CUkNmiNFhKEmUkNCWpvr8lipPaJRReUJ_vT2UgBiZuYRZEo2TuyP_0bhpL9dkaYlw3iJXipXOoMoU9_lxtDCe2k5ioIfHv4-oo8eGn0Vz1KjVtdt9WM1aqMZCeSfdnOZ5jYGWGx5iwFCmDwEOYyST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