John E. Malmberg wrote:
This patch fixes a few cases where it either it may be possible that a buffer was overrun, or that a code change to dynamic allocation could cause a sizeof() operator to be incorrect. In several places a buffer was under allocated by 1 byte.

This also restores the default behavior to be for stat() to handle /dev/null and nla0:. As of this patch, the accvio is not showing up, and based on HP's investigation, it was caused by corruption of the memory used for malloc() before the stat() call.

The suspicion by HP was that there was a 1 byte overrun of an buffer being allocated by malloc().

If the access violation shows back up, I intend to troubleshoot by over allocating memory allocations by 1 or more bytes and putting a signature in those bytes, which will be checked when memory is freed.

The access violation is still there. I forgot that I had to run the test from the test harness to reproduce it.

So if you apply the patch, modify it to not change the last section, and the old dev/null hack will be compiled in.

My next step is to modify the wrappers for safe malloc and free in util.c to detect overruns and assert when that happens before calling free().

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to