This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/14229] New: strtok_r() doesn't work with x32


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.


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