src/ksp/pc/impls/asm/ftn-custom/zasmf.c:56: pcasmgetlocalscaling_() always creates an nloc-element Fortran pointer descriptor when the output argument is present, even when PCASMGetLocalScaling() returns tscaling == NULL. The trigger is calling the Fortran getter after PCSetUp() but before installing weights: nloc is positive while the documented scaling result is NULL. F90Array1dCreate() forwards that null address to f90array1dcreatefortranaddr_(), which associates a positive-length pointer with it, so inspecting the returned array can access invalid memory. Only create the descriptor when tscaling is non-null, otherwise return a properly disassociated/empty Fortran pointer, and add a Fortran test for the unset state.Reviewed all 15 files and all 818 lines of the fetched diff. The contents of src/ksp/ksp/tutorials/output/ex8_weighted.out and src/ksp/ksp/tutorials/output/ex8_weighted_zero.out were excluded as reference-output bodies by review policy; their presence and correspondence to the new tests were checked. No binary files were present.
Generated by OpenCode 1.18.29, model argo/gpt56sol, effort level unavailable, 2026-09-08 17:40:10 CDT; MR_IID=9579; CI_PIPELINE_ID unavailable; CI_JOB_ID unavailable.