This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: LU_decomp segfault
- From: Gerard Jungman <jungman at lanl dot gov>
- To: "Matthew J. Doller" <mdoller at wpi dot edu>
- Cc: gsl-discuss <gsl-discuss at sources dot redhat dot com>
- Date: Thu, 17 Jan 2002 16:26:13 -0700
- Subject: Re: LU_decomp segfault
- Organization: LANL T-3
- References: <1011295730.7160.3.camel@mrburns.mydomain.com>
"Matthew J. Doller" wrote:
>
> the offending code looks like this:
>
> ...
> int * interchange;
> ...
> error = gsl_linalg_LU_decomp ( m , perm , interchange);
> // ^^^^ segfault occurs here. following printf is never reached.
The pointer 'interchange' is dangling. This should read
int interchange;
...
error = gsl_linalg_LU_decomp ( m, perm, &interchange );
...
That's probably the trouble.
--
G. Jungman