Check return value of malloc
nh2 opened this issue · comments
Niklas Hambüchen commented
Most of the code doesn't seem to check the return value of malloc()
(respecively the wrapper vl_malloc()
).
This results in segfault crashes when the machine is running out of memory.
In the places where malloc()
is directly used instead of vl_malloc()
, vlfeat already correctly checks the returned value:
Lines 363 to 371 in 1b9075f
One convenient way to do it would be to just do this check directly in vl_malloc()
, to handle all usages in one go.
Niklas Hambüchen commented
I opened PR #193 to address this.