<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/96978>96978</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Segmentation Fault
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vskdtc
</td>
</tr>
</table>
<pre>
from concrete import fhe
def max_two_numbers(a, b):
return (a + b + abs(a - b)) // 2
def max_in_list(numbers):
max_value = numbers[0]
for num in numbers[1:]:
max_value = max_two_numbers(max_value, num)
return max_value
numbers = [3, 1, 4, 1, 5, 9, 2]
compiler = fhe.Compiler(max_in_list, {"numbers": "encrypted"})
inputset = [[numbers]]
circuit = compiler.compile(inputset)
encrypted_inputs = circuit.encrypt(numbers)
encrypted_result = circuit.run(encrypted_inputs)
result = circuit.decrypt(encrypted_result)
print("Maximum value in the list:", result)
-------
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):
0 _mlir.cpython-311-darwin.so 0x000000010ab3dbd7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 _mlir.cpython-311-darwin.so 0x000000010ab3ca06 llvm::sys::RunSignalHandlers() + 198
2 _mlir.cpython-311-darwin.so 0x000000010ab3e2b0 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 848
3 libsystem_platform.dylib 0x00007ff8145475ed _sigtramp + 29
4 libsystem_platform.dylib 0x0000000000000008 _sigtramp + 18446603370239855160
5 libConcretelangBindingsPythonCAPI.dylib 0x00000001103cd979 mlir::SymbolTable::getSymbolName(mlir::Operation*) + 25
6 _concretelang.cpython-311-darwin.so 0x000000010bb6b163 mlir::concretelang::createTFHECircuitSolutionParametrizationPass(std::__1::optional<concrete_optimizer::dag::CircuitSolution>) + 53779
7 _concretelang.cpython-311-darwin.so 0x000000010bb6aab7 mlir::concretelang::createTFHECircuitSolutionParametrizationPass(std::__1::optional<concrete_optimizer::dag::CircuitSolution>) + 52071
8 libConcretelangBindingsPythonCAPI.dylib 0x00000001103dbac7 mlir::detail::walk(mlir::Operation*, llvm::function_ref<mlir::WalkResult (mlir::Operation*)>, mlir::WalkOrder) + 199
9 _concretelang.cpython-311-darwin.so 0x000000010bb5fbfe mlir::concretelang::createTFHECircuitSolutionParametrizationPass(std::__1::optional<concrete_optimizer::dag::CircuitSolution>) + 7342
10 _concretelang.cpython-311-darwin.so 0x000000010bb5efff mlir::concretelang::createTFHECircuitSolutionParametrizationPass(std::__1::optional<concrete_optimizer::dag::CircuitSolution>) + 4271
11 libConcretelangBindingsPythonCAPI.dylib 0x0000000110296f16 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 582
12 libConcretelangBindingsPythonCAPI.dylib 0x0000000110297606 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 358
13 libConcretelangBindingsPythonCAPI.dylib 0x000000011029941d mlir::PassManager::run(mlir::Operation*) + 1037
14 _concretelang.cpython-311-darwin.so 0x000000010b8fb9d1 mlir::concretelang::pipeline::parametrizeTFHE(mlir::MLIRContext&, mlir::ModuleOp&, std::__1::optional<mlir::concretelang::V0FHEContext>&, std::__1::function<bool (mlir::Pass*)>) + 1425
15 _concretelang.cpython-311-darwin.so 0x000000010b90e993 mlir::concretelang::CompilerEngine::compile(mlir::ModuleOp, mlir::concretelang::CompilerEngine::Target, std::__1::optional<std::__1::shared_ptr<mlir::concretelang::CompilerEngine::Library>>) + 4355
16 _concretelang.cpython-311-darwin.so 0x000000010b91289c mlir::concretelang::CompilerEngine::compile(mlir::ModuleOp, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, bool, bool, bool) + 380
17 _concretelang.cpython-311-darwin.so 0x000000010b91278d mlir::concretelang::CompilerEngine::compile(mlir::ModuleOp, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, bool, bool, bool) + 109
18 _concretelang.cpython-311-darwin.so 0x000000010b7c2a27 PyInit__concretelang + 99639
19 _concretelang.cpython-311-darwin.so 0x000000010b7c2495 PyInit__concretelang + 98213
20 _concretelang.cpython-311-darwin.so 0x000000010b817c2c PyInit__concretelang + 448316
21 _concretelang.cpython-311-darwin.so 0x000000010b7b5348 PyInit__concretelang + 44632
22 libpython3.11.dylib 0x0000000109fc4028 cfunction_call + 72
23 libpython3.11.dylib 0x0000000109f7bcd4 _PyObject_MakeTpCall + 228
24 libpython3.11.dylib 0x000000010a069a97 _PyEval_EvalFrameDefault + 57351
25 libpython3.11.dylib 0x000000010a05b9e0 _PyEval_Vector + 336
26 libpython3.11.dylib 0x0000000109f7bb72 _PyObject_FastCallDictTstate + 258
27 libpython3.11.dylib 0x0000000109f7c80a _PyObject_Call_Prepend + 154
28 libpython3.11.dylib 0x0000000109fe3669 slot_tp_init + 185
29 libpython3.11.dylib 0x0000000109fd9bb4 type_call + 356
30 libpython3.11.dylib 0x0000000109f7bcd4 _PyObject_MakeTpCall + 228
31 libpython3.11.dylib 0x000000010a069a97 _PyEval_EvalFrameDefault + 57351
32 libpython3.11.dylib 0x000000010a05b84c PyEval_EvalCode + 188
33 libpython3.11.dylib 0x000000010a0b97d3 run_mod + 147
34 libpython3.11.dylib 0x000000010a0b8424 PyRun_InteractiveOneObjectEx + 564
35 libpython3.11.dylib 0x000000010a0b7af3 _PyRun_InteractiveLoopObject + 179
36 libpython3.11.dylib 0x000000010a0b79a3 _PyRun_AnyFileObject + 83
37 libpython3.11.dylib 0x000000010a0b819a PyRun_AnyFileExFlags + 58
38 libpython3.11.dylib 0x000000010a0d7037 Py_RunMain + 2551
39 libpython3.11.dylib 0x000000010a0d7310 pymain_main + 320
40 libpython3.11.dylib 0x000000010a0d736b Py_BytesMain + 43
41 dyld 0x00007ff8141bf41f start + 1903
zsh: segmentation fault python
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWdtv4ywW_2vcF9TKgK8PeUjTRl-ldhu11bfafbGwwQk7NliA2-b761cY7FyaaWei2V2NtH6grjnnd-5wIERrvhaMzYL4OohvLkhvNlLNXvU3aqqLUtLtrFayBZUUlWKGAd52UhlQb1gQ3gTh3I2U1aAl74V5k4Xo25IpHaCMBGgBygDlAfZ0AACgmOmVAHYeBOgalMNIyoEDXDoGlIMALQO0BOiUHC6KhmsToGySdijEEr2SpmcgwDdgJIqvwyC-2VHVUtk5wMUeCbRA8c0B3EfIj9ZO89Zq0bdWJQfgLd4R7Fnk-QfMIL7GlhnaIZreYjvkdkCT9pVsO94wNfDVG3a18B-8IpODFiBIrwOEJj1RgOcgQIiJSm07w6j9lN5M2nLR9UYzM2oUxNeTb2528rmqeu6IRl2u_EuAshFkQp2kFW7KMTqQKz95GM0jNsV035gDNtWLAGXHyBPvCQ7KRkHHwBOXGzvFhSULEHog77ztW-BCzwUwGwYG3-K5dR1agJMQl-7Z_-TGZ0Oqb4D2bQfeuNnI3gC9bUvZAEFapsGgne4VA1vZgw15ZaBpXttLR8T_YspqsZW9Aqv5yx9AKmDDZdVi4pUrKVomDHglCgRJeH__50Px_I-H68f7u3_ePhWWJUhCYCToJBfGvnCzXz5uDAEo2oarq6rbmo0UlxjCS0rUGxdXWoLwPXQPDEmJaUnTQUkLgud6q93LyrpxsPdFkcomxo5IkbdCaqMYaQOUWDcOLs-H1QB7V8LPtdh_DjWqSJic0uipF898LUjzBxG0cYU7CoV55qSin7GdoTL8Adsfxa1SUjnhB454NoqL9ROrh9VSymbUJ4u8Phg0vNRbbVhbdA0xtVTtFd02vARHj1MtresMRnGUxoyCQvO1UaTtBswxRyPwk5h7T3aECbMo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