This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for PRs 36043, 58744 and 65408
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>, Alan Modra <amodra at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 14 Mar 2015 18:56:01 +0100
- Subject: Re: Fix for PRs 36043, 58744 and 65408
- Authentication-results: sourceware.org; auth=none
- References: <20150314130238 dot GD16488 at bubble dot grove dot modra dot org> <6E83247A-F634-43AA-A3F1-249F99AE7719 at gmail dot com> <277E04CB-8E5D-4F1D-BECA-8A97BDD43DF7 at comcast dot net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Mar 14, 2015 at 10:51:28AM -0700, Mike Stump wrote:
> On Mar 14, 2015, at 6:58 AM, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
> > On March 14, 2015 2:02:38 PM GMT+01:00, Alan Modra <amodra@gmail.com> wrote:
> >
> >> I'll also throw together a testcase or three. For execute tests I'm
> >> thinking of using sbrk to locate an odd sized struct such that access
> >> past the end segfaults, rather than mmap/munmap as was done in the
> >> pr36043 testcase. Does that sound reasonable?
> >
> > Well since sbrk was marked LEGACY in SUSv2 and was removed in SUSv3 (and still is in 1003.1-2008) I'm not sure it is wise to use it in new code.. Using it will bite testing on legacy-free setups, fwiw.
>
> newlib doesnât have mmap. Indeed, some machines will never have mmap. newlib has sbrk.
Still, I think it is preferrable to test with mmap...
Jakub