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: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 29 Dec 2010 11:09:40 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=t+IXm8Z7ubGz4IxFh1Toryd924AiwbxQAJeDSNTBoSo=; b=NcirREhxkexfWhfgspTjNa00YdrRTK7GUlbTS0msDZrSNte+bPmjkXh/shOxhxlNQG ic7Ahqdj/m17XagcUFbIWJapMqbhGSpbSONHmzyIM61qlpGhAVUYyVaq6SWTUKns6aPd bpdp8/nS1nvkw3oD2u0SxTj/BODMVn+67NghY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=mTwAHZ6KTrFs/sUNg/lP+32pW/yzUQmSVEahdFxPhQ2lWR0qtXYvdJJkMMvRaa/G+X tcxyiHV+CETIR/mIsgcnjCCRsKTD0m2QuqnU+sHwrTDkai1infxQMRZzUPTFikDozF6V cbS/kVwraNhCX4U00HcOxFW6ASAhRsbfx50WQ=
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
>