This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11230] memchr overshoots on ia64
- From: "pasky at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 4 Feb 2010 01:22:02 -0000
- Subject: [Bug libc/11230] memchr overshoots on ia64
- References: <20100128025427.11230.jrnieder@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From pasky at suse dot cz 2010-02-04 01:22 -------
cat >memchr.c <<EOT
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
int main(int argc, const char * const argv[])
{
struct stat st;
lstat(argv[1], &st);
int fd = open(argv[1], O_RDONLY);
void *data = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
void *t = memchr(data, 0, st.st_size);
printf("ptr: %p, ret: %p, len: 0x%zx\n", data, t, st.st_size);
return 0;
}
EOT
gcc -o memchr memchr.c
cat >memchr.t <<EOT
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
EOT
./memchr memchr.t
# Reports that ret is non-NULL. ret should be NULL.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11230
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.