Re: -Wshift-negative-value
Bruno Haible <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <13550122.vfvJseVPFO@omega> |
Hi Sam, > here is what I see at the tip (./configure --with-debug --cbc on macosx) > > --8<---------------cut here---------------start------------->8--- > Warning: overwriting existing memory mappings in the address range 0x3fffffedd000...0x3fffffeddfff. clisp will likely crash soon!! > Warning: overwriting existing memory mappings in the address range 0x200262000...0x200262fff. clisp will likely crash soon!! > Warning: overwriting existing memory mappings in the address range 0x3fffffedc000...0x3fffffedcfff. clisp will likely crash soon!! Oops. mincore() on Mac OS X is apparently not usable for detecting whether a page is mapped: it returns 0 in either case. Seen on Mac OS X 10.11 through the attached program. Fixed now. Bruno ------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel
test-mincore.c
(text/x-csrc, 1.1 KB)
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
int main () {
unsigned long addr;
unsigned long pagesize = getpagesize();
for (addr = 0; addr < 0x1000000; addr += pagesize) {
char vec[1];
int ret = mincore((void*)addr, pagesize, vec);
printf ("addr=0x%lx ret=%d flags=%x\n", addr, ret, vec[0]);
}
addr = (unsigned long) &main & -pagesize;
{
char vec[1];
int ret = mincore((void*)addr, pagesize, vec);
printf ("addr=0x%lx ret=%d flags=%x\n", addr, ret, vec[0]);
}
addr = (unsigned long) &pagesize & -pagesize;
{
char vec[1];
int ret = mincore((void*)addr, pagesize, vec);
printf ("addr=0x%lx ret=%d flags=%x\n", addr, ret, vec[0]);
}
for (addr = 0; addr < 0xff000000; addr += 0x1000000) {
char vec[1];
int ret = mincore((void*)addr, pagesize, vec);
printf ("addr=0x%lx ret=%d flags=%x\n", addr, ret, vec[0]);
}
for (addr = 0; addr < 0xff00000000000000ul; addr += 0x100000000000000ul) {
char vec[1];
int ret = mincore((void*)addr, pagesize, vec);
printf ("addr=0x%lx ret=%d flags=%x\n", addr, ret, vec[0]);
}
}