[petsc-dev] Valgrind report a bug in PetscOptionsFindPair_Private
Smith, Barry F.
bsmith at mcs.anl.gov
Thu Jun 21 15:12:50 CDT 2018
Fixed in barry/fix-petscstrlcat/maint
I also doubled the length of the work strings used in processing options so your options won't get truncated and hence not get processed properly.
Barry
> On Jun 20, 2018, at 8:48 AM, Eric Chamberland <Eric.Chamberland at giref.ulaval.ca> wrote:
>
> Hi,
>
> since we recently upgraded our nighlty valgrind validations to PETSc 3.9.2, valgrind found a bug in PetscOptionsFindPair_Private, called from:
>
> PetscOptionsHasName("M_AssembleurGD_H_/pmi/cmpbib/compilation_BIB_gcc_valgrind/COMPILE_AUTO/BIBTestValidation/Ressources/opt/Test.assemblageDynamique/Ressources.Lettre_C_2016_gsf_P2B5_Z450_mp/Lettre_C_2016_gsf_P2B5_Z450_mp_A_SolveurLin_pour_solveur_","-::GIREF_NOM_PREFIXE_OPTIONS_PETSC");
>
> valgrind complains with:
>
> ==253393== Source and destination overlap in strncat(0x1ffeff62e0, 0x1ffeff6299, 108)
> ==253393== at 0x4C2C976: strncat (vg_replace_strmem.c:348)
> ==253393== by 0x1522912F: PetscStrlcat (str.c:460)
> ==253393== by 0x151DE08A: PetscOptionsFindPair_Private (options.c:1361)
> ==253393== by 0x151DF153: PetscOptionsHasName (options.c:1502)
> ...
>
> We noticed that the PETSc code has changed close from there, so maybe it is related?
>
> We do not have the bug with Petsc versions: {3.5.3,3.8.3} that we used to tests with valgrind.
>
> Thanks,
>
> Eric
More information about the petsc-dev
mailing list