[MINC-users] Custom kernels in mincmorph
Claude LEPAGE
claude at bic.mni.mcgill.ca
Thu Nov 22 15:44:39 EST 2007
Simon, Andrew,
Has this issue been resolved?
> >> Andrew, it is line 120 in kernel_io.c that worries me (kernel is freed
> >> right before calling input_kernel). I'm using version 1.4.
> >
> > You lost me. Do you mean in kernel_io.c or mincmorph.c? input_kernel()
> > is defined in kernel_io.c
>
> kernel is freed at line 505 in mincmorph.c subsequently input_kernel()
> is called where (line 120 in kernel_io.c) kernel imho is used uninitialized.
ok. I see this. I think the current code is safe, since kernel is first
initialized at line 436 of mincmorph.c:
/* init and then do some operations */
kernel = new_kernel(0);
At line 505, this default kernel is freed in order to read in the user-supplied
one. Looks fine to me.
Communicate with me, Simon, if you are still getting a seg fault with mincmorph.
To help you, I will need the inputs in order to reproduce the problem.
Claude
More information about the MINC-users
mailing list