[fpc-pascal] valgrind: "invalid read"
Pierre Free Pascal
pierre at freepascal.org
Fri Jun 5 11:11:51 CEST 2015
> -----Message d'origine-----
> De : fpc-pascal-bounces at lists.freepascal.org [mailto:fpc-pascal-
> bounces at lists.freepascal.org] De la part de Jonas Maebe
> Envoyé : vendredi 5 juin 2015 10:52
> À : FPC-Pascal users discussions
> Objet : Re: [fpc-pascal] valgrind: "invalid read"
> 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
> > 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.
OK, thanks for the explanation, it was indeed
the page boundary problem I was afraid of.
More information about the fpc-pascal