Re: [eigen] [Patch] Bug in Sparse module |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] [Patch] Bug in Sparse module
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 31 Dec 2010 17:13:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=lyJOd4Iz+g4RoN2oz3DianJ8A7zM6WYUhSouVN6theY=; b=e3MxlO7k3Ozj5VUS/cKFa8/n7EIzpRqXCLIa8zpRLJYVUzaoL85ZFUzF9PeFCQB1w5 mWM7ZzLlLPCfOyNwfpEJkOST9Xt5QCdMW6SVlcFeVzhccsC7nCb8CsFnZIRHSpA8NO8p fE8CRoeI5GovlkI1gryRwYsmOFSZ965e0Mc6A=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=KZfVMoviQ1ZfeFtyJvkX4foAsL3LaAeBMX2MAIIN/tvPxrS6LM36G348+UJU4d/Bi0 fHXIekAKBaJ213uws47MichBjkrWxP+V8EzgtT9A2Oakkpgki08HVXHx1YUOwS+McFpp Hd+4kqfVL6/uBFhy7BEFSxor5dCEs6VV/D+UA=
thank you for the report, pb fixed though I did not applied your patch
because I prefer to keep a single instance of the loop
gael
On Wed, Dec 29, 2010 at 5:09 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> Thanks; Gael will handle this when he can: he might be on vacation.
>
> Benoit
>
> 2010/12/28 David Luitz <tux008@xxxxxxxxxxxxxx>:
>> Hi all,
>>
>> There is a bug in the Sparse Module, in
>> Eigen/src/Sparse/SparseDenseProduct.h class SparseTimeDenseProduct.
>>
>> The problem is, that j runs from 0 to lhs.outerSize(), and coeff(j,0) may be
>> out of range if lhs is Row major. This results in a segmentation fault,
>> which is illustrated by the piece of code attached in the file sparse2.cc.
>> (Change the commented line to compare both cases.)
>>
>> I have written a patch that solves this problem by changing the order of the
>> existing code. The new code also eliminates the temporary variables dest_j
>> and rhs_j in the cases where they are not needed.
>>
>> The patch should work against mercurial revision 3604:537b5d33b440
>>
>> Greetings,
>> David J. Luitz
>>
>
>
>