Not setting "filename" seems to have fixed this (MR)

On Fri, Dec 10, 2021 at 2:59 PM Mark Adams <mfadams@lbl.gov> wrote:
whoops ...

This code is here. 

           if (filename .ne. PETSC_NULL_CHARACTER) then
              filename = trim(filename)
           endif

Maybe filename should not be used as the destination?

On Fri, Dec 10, 2021 at 2:56 PM Mark Adams <mfadams@lbl.gov> wrote:
I am getting a segv when calling a Fortran subrouting from C, where PetscInit is called in the Fortran code only with a string for the rc file.

We have seen this on multiple platforms.

I got it in totalview and the segv was on the trim(filename) method