daducci / COMMIT

Linear framework to combine tractography and tissue micro-structure estimation with diffusion MRI
Other
45 stars 33 forks source link

Fix segfault when using new regularization scheme #49

Closed daducci closed 6 years ago

daducci commented 6 years ago

When using the new code (@matteofrigo ), sometimes (randomly) there is the following error:

Python(80308,0x7fff8f699380) malloc: error for object 0x7ff19f64c400: incorrect checksum for freed object - object was probably modified after being freed. set a breakpoint in malloc_error_break to debug Abort trap: 6

The main issue is that when there aren't EC or ISO compartments and the lambda for a given regularization is set to zero, the non_negativity prox was calculated in any case for these compartments even though there weren't such coefficients. This could lead to accessing bad memory locations and generate segfaults.