Barry Smith <[email protected]> writes:

>> On Aug 24, 2020, at 2:34 PM, Jed Brown <[email protected]> wrote:
>> 
>> I'm thinking of something such as writing floating point data into the 
>> return address, which would be unaligned/garbage.
>
>   Ok, my patch will detect this. This is what I was talking about, messing up 
> the BLAS arguments which are the addresses of arrays.
>
>   Valgrind is by far the preferred approach.

FWIW, Valgrind is very limited at detecting stack corruption, and 
PetscMallocVerify known nothing about the stack.  That said, it's unusual to 
place large arrays on the stack.

>   Barry
>
>   Another feature we could add to the malloc checking is when a SEGV or BUS 
> error is encountered and we catch it we should run the PetscMallocVerify() 
> and check our memory for corruption reporting any we find.

Reply via email to