Ticket #386 (assigned defect)

Opened 1 year ago

Last modified 1 year ago

uClibc printf broken, prevents ulog-acctd from working

Reported by: tg Assigned to: tg (accepted)
Priority: major Milestone: 1.1
Component: general Version: trunk
Keywords: Cc:

Description (Last modified by tg)

build$ cat >test.c <<-EOF
        #include <stdio.h>

        int
        main(int argc, const char *argv[])
        {
                printf(argv[1], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
                putchar('\n');
                return (0);
        }
EOF
build$ gcc -o test-host test.c
build$ ./cross_mipsel/host/bin/mipsel-linux-gcc -o test-target test.c

host$ ./test-host '%d'
1
host$ ./test-host '%1$d'
1
host$ ./test-host '%2$d'
2
host$ ./test-host '%10$d'
10

target$ ./test-target '%d'
1
target$ ./test-target '%1$d'
1
target$ ./test-target '%2$d'
0
target$ ./test-target '%10$d'
2147449720

This also happens when I bump UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS to 29 from 9 in toolchain/uClibc/files/config.mipsel and rebuild µClibc.

Attachments

Change History

10/29/07 18:21:54 changed by tg

  • owner changed from wbx to tg.
  • status changed from new to assigned.
  • description changed.

Add/Change #386 (uClibc printf broken, prevents ulog-acctd from working)