primesearch / Mlucas

Ⓜ️ Ernst Mayer's Mlucas and Mfactor programs for GIMPS
https://mersenneforum.org/mayer/README.html
GNU General Public License v3.0
8 stars 2 forks source link

Undefined behavior on Windows: "call to function X through pointer to incorrect function type" #29

Open tdulcet opened 6 months ago

tdulcet commented 6 months ago

Undefined behavior detected when Mlucas is compiled on Windows with Clang and UBSan enabled:

../src/threadpool.c:452:5: runtime error: call to function mers_process_chunk through pointer to incorrect function type 'void (*)(void *, int)'
../src/threadpool.c:452:5: runtime error: call to function fermat_process_chunk through pointer to incorrect function type 'void (*)(void *, int)'