|
Sources Bugzilla – Full Text Bug Listing |
| Summary: | strtok_r() doesn't work with x32 | ||
|---|---|---|---|
| Product: | glibc | Reporter: | Mike Frysinger <vapier> |
| Component: | libc | Assignee: | H.J. Lu <hjl.tools> |
| Status: | VERIFIED FIXED | ||
| Severity: | normal | CC: | drepper.fsp |
| Priority: | P1 | ||
| Version: | 2.15 | ||
| Target Milestone: | 2.16 | ||
| URL: | http://sourceware.org/ml/libc-alpha/2012-06/msg00357.html | ||
| Host: | Target: | x86_64-linux-gnux32 | |
| Build: | Last reconfirmed: | ||
A patch is posted at http://sourceware.org/ml/libc-alpha/2012-06/msg00357.html Fixed on master branch and hjl/x32/release/2.15 branch. works great! # lsmod Module Size Used by udf 75868 0 usb_storage 35339 1 dm_mod 63508 0 xt_tcpudp 2311 2 iptable_filter 1120 1 |
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}