Comment 4 for bug 414597

Revision history for this message
Arnd (arnd-arndnet) wrote :

I did a debug run with ddd.
The segfault happens in get_ra_blocks() at the code snippet:

  for (i = 0; i <= statbuf.st_size; i += 4096) {
----> if (mincorebuf[i / 4096])
                        there++;
                else
                        notthere++;
                if (phase == 1 && !mincorebuf[i / 4096]) {
                        phase = 0;
                        if (i > statbuf.st_size)
                                i = statbuf.st_size + 1;
                        record[rcount].offset = start;
                        record[rcount].len = i - 1 - start;
                        rcount++;
                        if (rcount >= 4000) rcount = 4000;
                } else if (phase == 0 && mincorebuf[i / 4096]) {
                        phase = 1;
                        start = i;
                }
        }