fynv / ThrustRTC

CUDA tool set for non-C++ languages that provides similar functionality like Thrust, with NVRTC at its core.
Other
59 stars 6 forks source link

segfault in reduction (due to NULL returned from native.n_reduce()) #9

Closed slayoo closed 3 years ago

slayoo commented 3 years ago

in api_Reductions.cpp, the native.n_reduce may return a nullptr: https://github.com/fynv/ThrustRTC/blob/6b40fc0481b82b3dee4247c894bc59d3e872d594/python/api_Reductions.cpp#L56 but it is not handled in Reductions.py: https://github.com/fynv/ThrustRTC/blob/bd26f89f380f33fe5122c97657b520b703fd74d3/python/ThrustRTC/Reductions.py#L18 and a segfault is triggered within ValueFromDVPtr

HTH

fynv commented 3 years ago

Just did a fix in Reductions.py

slayoo commented 3 years ago

Thank you!