[CRIU] [PATCH 3/5] pie: piegen -- Don't dereference section data too early
Cyrill Gorcunov
gorcunov at gmail.com
Tue Jun 9 07:44:38 PDT 2015
On Tue, Jun 09, 2015 at 04:27:34PM +0200, Laurent Dufour wrote:
> >
> > - for (j=0; j < sh->sh_size; j++, k++) {
> > + for (j = 0; j < sh->sh_size; j++, k++) {
> > if (k && (k % 8) == 0)
> > pr_out("\n\t");
> > + ptr_func_exit(&shdata[j]);
>
> I don't think this is the right place to put such a check. If we want to
> ensure that the pointer is in the object file (which should be
> guaranteed by the compiler), we should check for the end pointer of the
> shdata prior to this loop. Here we will check each byte of each section...
>
> This being said, I can't see the need for such a check. Could you please
> elaborate on this ?
Yeah, this one is toi much, but won't hurt. Better do ptr_func_exit(shdata)
earlier. So this is leftover from my debugging attempts when build crashed.
I'll clean up all this on top once merged.
More information about the CRIU
mailing list