Maratyszcza / pthreadpool

Portable (POSIX/Windows/Emscripten) thread pool for C/C++
BSD 2-Clause "Simplified" License
342 stars 132 forks source link

Avoid FPE in divide_round_up #46

Closed fuzzer1121 closed 3 weeks ago

fuzzer1121 commented 2 months ago

Add assert to check divisor is not 0 in divide_round_up.

This can be triggered if tile_j or tile_k parameters of pthreadpool_parallelize_3d_tile_2d are zero.