[fpc-pascal] valgrind: "invalid read"

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Jun 5 10:52:19 CEST 2015


Pierre Free Pascal wrote on Fri, 05 Jun 2015:
>
> I am not sure I understand why it is a false positive:
>
> The read size is 16, at offset 16, which make it read up to position 32,
> while only 30 byte were allocated...
>   What is wrong in my analysis above?

These kinds of algorithms don't actually use the bytes read past the  
end of the data. They will also only read data from aligned addresses,  
so that the extra data cannot cross a page boundary and hence cannot  
cause a segmentation fault.


Jonas



More information about the fpc-pascal mailing list