[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#550625: libc6: Realloc sometimes fails to copy all memory correctly



On Sun, 11 Oct 2009, Sebastian Hahn wrote:

> I'm not sure why the test programs referenced don't trigger the bug on Lenny
> for me, but when patching the Tor source to manually compare the last few bytes
> of a buffer before it is realloc'ed to afterwards exhibits the issue.

It triggers for me on an 8-way amd64 system.  Not always immediatly, but
still:

| weasel@thelma:~/glibc$ for i in `seq 1 20`; do time ./a.out; done
| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  108.72s user 54.81s system 625% cpu 26.156 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  36.09s user 14.28s system 574% cpu 8.768 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  253.12s user 150.59s system 682% cpu 59.130 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  10.16s user 4.25s system 592% cpu 2.433 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  882.75s user 536.88s system 686% cpu 3:26.85 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  62.60s user 30.41s system 633% cpu 14.686 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  4.06s user 1.66s system 548% cpu 1.043 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  63.52s user 29.28s system 617% cpu 15.022 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  129.03s user 76.84s system 647% cpu 31.795 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  4.94s user 2.62s system 605% cpu 1.248 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  144.48s user 76.03s system 651% cpu 33.822 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  1668.76s user 911.53s system 696% cpu 6:10.36 total

| a.out: corruption.c:17: MyThread: Assertion `array[i] == i % 256' failed.
| zsh: abort      ./a.out
| ./a.out  250.74s user 159.60s system 673% cpu 1:00.97 total

...

-- 
                           |  .''`.  ** Debian GNU/Linux **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/



Reply to: