This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Reason for cygwin GCC 2.97 non-bootstrap found


On Tue, Nov 21, 2000 at 01:39:01PM -0500, Kelley Cook wrote:
> 
> Thanks Zack for looking at this.
> 
> Unfortunately, your new patch also fails, a least as applied to the
> version I have at work. 

Hmmm.  Either it isn't to do with freeing the middle out of a map
region, or the patch was thoroughly broken instead of just broken for
malloc users.

Could you [since Kelley is out of town till Sunday, this "you" is
anyone with a convenient cygwin installation] please compile and run
the appended test program under cygwin?  It should either exit
successfully, or crash; I need to know which.

> BTW, is there a direct way of applying a CVS -diff to files using
> patch?  I ended up breaking your patch into 11 different .diff files
> and apply them each individually.

For the patches I generate, "patch -p0 < xyz.diff" should work
provided you're in the directory the patch was generated relative to.
I try to make this the nearest common ancestor of all the files in the
patch.

zw

#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string.h>

#define PAGEPROT PROT_READ|PROT_WRITE
#define MAPFLAGS MAP_PRIVATE|MAP_ANONYMOUS

int main(void)
{
  size_t pagesize = getpagesize();
  char *base;

  base = mmap(0, 16*pagesize, PAGEPROT, MAPFLAGS, -1, 0);
  memset(base, 0xAB, 16*pagesize);

  munmap(base + 4*pagesize, pagesize);

  memset(base, 0xCD, 4*pagesize);
  memset(base + 5*pagesize, 0xCD, 10*pagesize);

  return 0;
}  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]