Possible Bug in linalg/balance.c

Aaron Schweiger aschweig@bu.edu
Sun Feb 22 00:51:00 GMT 2004

After further examination - I realize the problem was my own fault - one of
the inputs was infinite - leading to the variable s being infinity, which
then resulted in the infinite loop.  I'd like to suggest that
linalg/balance.c check for this condition, ie,

linalg/balance.c, line ~63

if (s == GSL_POSINF) { GSL_ERROR("domain error, cannot handle infinite
elements", GSL_EINVAL); }

Aaron Schweiger

-----Original Message-----
From: gsl-discuss-owner@sources.redhat.com
[mailto:gsl-discuss-owner@sources.redhat.com]On Behalf Of Aaron
Sent: Saturday, February 21, 2004 3:22 PM
To: Gsl-Discuss; Brian Gough
Subject: Possible Bug in linalg/balance.c

I encountered a hang while using multi linear fitting.  I loaded up gdb and
successfully traced the hang to linalg/balance.c.  What I found was that s =
gsl_blas_dasum(&A_j.vector) was returning an infinity, and thus the code in
linalg/balance.c (in particular the while loop on lines 63-67) would run
indefinitely, causing the code to hang.  I am not an expert on this
particular code - so I am a bit hesitant to make a correction.  Suggestions?
I am using mingw/gcc 3.2.3.

I don't yet have a small piece code to isolate the bug.

More information about the Gsl-discuss mailing list