[petsc-dev] Invalid read in PetscSubcommSetTypeGeneral

Jed Brown jedbrown at mcs.anl.gov
Thu Oct 3 08:53:13 CDT 2013


Does the bug also affect the release (maint) or did it appear since then?
Best to fix in the branch that introduced it, unless that is too old. In
any case, fix for the oldest integration branch that needs the fix.
On Oct 2, 2013 11:06 AM, "Hong Zhang" <hzhang at mcs.anl.gov> wrote:

> Stefano:
>
>> Hong,
>>
>> currently in master there's an error in PetscSubcommSetTypeGeneral,
>> namely in the loop starting at line 188
>>
>> for (i=0; i<2*size; i++) {    subsize[recvbuf[i]] = recvbuf[i+1];}
>>
>> recvbuf is allocated at line 178 as 2*size*sizeof(PetscMPIInt), and the
>> loop tries to read at location 2*size
>>
>> Could you please fix it?
>>
>
> Hmm, your fix is correct.
>
> Jed:
> Can I fix it on master directly, or shall I do it on a branch?
> Hong
>
>>
>>
>>
>>
>> --
>>
>> Ph. D. Stefano Zampini
>> CINECA
>> SuperComputing Applications and Innovations Department - SCAI
>> Via dei Tizii, 6 00185 Roma - ITALY
>> ------------------------------------------------------------------------------------------------------------------------
>> Email: s.zampini at cineca.it
>> SkypeID: stefano.zampini
>> GoogleTalk: stefano.zampini at gmail.com
>> Tel: +39 06.44486.707
>> ------------------------------------------------------------------------------------------------------------------------
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131003/612eaeb0/attachment.html>


More information about the petsc-dev mailing list