This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14229] New: strtok_r() doesn't work with x32
- From: "vapier at gentoo dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 13 Jun 2012 16:11:34 +0000
- Subject: [Bug libc/14229] New: strtok_r() doesn't work with x32
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14229
Bug #: 14229
Summary: strtok_r() doesn't work with x32
Product: glibc
Version: 2.15
Status: NEW
Severity: normal
Priority: P1
Component: libc
AssignedTo: hjl.tools@gmail.com
ReportedBy: vapier@gentoo.org
CC: drepper.fsp@gmail.com
Classification: Unclassified
Target: x86_64-linux-gnux32
tested the patched glibc-2.15 as well as the latest git mainline
$ cat test.c
#include <stdio.h>
#include <string.h>
int main() {
char line[] = "udf 75868 1 - Live 0xffffffffa0bfb000\n";
char *saveptr, *tok = strtok_r(line, " \t", &saveptr);
printf("tok: {%s}\nshould be: {udf}\n", tok);
return 0;
}
$ gcc -Wall test.c -m64 && ./a.out
tok: {udf}
should be: {udf}
$ gcc -Wall test.c -m32 && ./a.out
tok: {udf}
should be: {udf}
$ gcc -Wall test.c -mx32 && ./a.out
tok: {}
should be: {udf}
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.