This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: bug in combine
- From: James E Wilson <wilson at specifix dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 25 Aug 2005 14:57:06 -0700
- Subject: Re: RFC: bug in combine
- References: <892d2a3b1deb45d0cb883c2df201e084@apple.com>
Dale Johannesen wrote:
> This is wrong, because 4 bytes starting at 73 goes outside the original
> object and can
> cause a page fault.
FYI You can write a testcase for this by using mmap to allocate a page
of memory, putting a copy of the structure 76 bytes from the end of the
mmapped region, and then trying to access the field b. Having a
testcase will help ensure that the bug is fixed and stays fixed.
There is a existing similar testcase in gcc.dg/20030711-1.c that you can
use as a model.
I haven't tried looking at the bug yet.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com