|
From: Eyal L. <ey...@ey...> - 2004-11-06 01:59:18
Attachments:
zz32.sh
|
I keep up-to-date with cvs. I have this error reported for a long time now (over a year?), but decided it is time to report it. The small attached script demonstrates the error. I get this output, note the "Invalid read of size 1" errors. The parent printf is good, the child provokes an error. $ sh ~/zz32.sh gcc (GCC) 3.3.4 (Debian 1:3.3.4-13) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. /home/eyal/zz32.c(78) will pthread_attr_init /home/eyal/zz32.c(81) pthread_attr_init=0 forking, name='/home/eyal/zz32' forked, name='/home/eyal/zz32', pid=10148 ==10148== Thread 2: ==10148== Invalid read of size 1 ==10148== at 0x1B9BF6A9: _IO_vfprintf (in /lib/tls/libc-2.3.2.so) ==10148== by 0x1B9C11EB: (within /lib/tls/libc-2.3.2.so) ==10148== Address 0x52BFED94 is not stack'd, malloc'd or (recently) free'd ==10148== ==10148== Thread 2: ==10148== Invalid read of size 1 ==10148== at 0x1B9E6A20: _IO_default_xsputn (in /lib/tls/libc-2.3.2.so) ==10148== Address 0x52BFED94 is not stack'd, malloc'd or (recently) free'd forked, name='/home/eyal/zz32', pid=0 ==10148== ==10148== ==10148== 68 bytes in 1 blocks are possibly lost in loss record 3 of 5 ==10148== at 0x1B904FE5: calloc (vg_replace_malloc.c:175) ==10148== by 0x1B8F25A8: (within /lib/ld-2.3.2.so) ==10148== by 0x1B8F265F: (within /lib/ld-2.3.2.so) ==10148== by 0x1B8F2887: _dl_allocate_tls (in /lib/ld-2.3.2.so) ==10148== by 0x1B9185FC: vgArch_thread_create (libpthread.c:109) ==10148== by 0x1B910914: pthread_create (vg_libpthread.c:1070) ==10148== by 0x8048815: test (zz32.c:83) ==10148== by 0x804893D: main (zz32.c:114) ==10148== ==10148== ==10148== 1184 bytes in 1 blocks are possibly lost in loss record 5 of 5 ==10148== at 0x1B9051B9: memalign (vg_replace_malloc.c:216) ==10148== by 0x1B8F2631: (within /lib/ld-2.3.2.so) ==10148== by 0x1B8F2887: _dl_allocate_tls (in /lib/ld-2.3.2.so) ==10148== by 0x1B9185FC: vgArch_thread_create (libpthread.c:109) ==10148== by 0x1B910914: pthread_create (vg_libpthread.c:1070) ==10148== by 0x8048815: test (zz32.c:83) ==10148== by 0x804893D: main (zz32.c:114) /home/eyal/zz32.c(63) fork_test rc=0 /home/eyal/zz32.c(100) joined ==10145== warning: Valgrind's pthread_attr_destroy does nothing ==10145== your program may misbehave as a result /home/eyal/zz32.c(105) pthread_attr_destroy=0 /home/eyal/zz32.c(117) test done -- Eyal Lebedinsky (ey...@ey...) <http://samba.org/eyal/> |
|
From: Tom H. <th...@cy...> - 2004-11-06 11:02:47
|
In message <418...@ey...>
Eyal Lebedinsky <ey...@ey...> wrote:
> I keep up-to-date with cvs. I have this error reported for a long
> time now (over a year?), but decided it is time to report it.
>
> The small attached script demonstrates the error. I get this output,
> note the "Invalid read of size 1" errors. The parent printf is good,
> the child provokes an error.
>
> $ sh ~/zz32.sh
> gcc (GCC) 3.3.4 (Debian 1:3.3.4-13)
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> /home/eyal/zz32.c(78) will pthread_attr_init
> /home/eyal/zz32.c(81) pthread_attr_init=0
> forking, name='/home/eyal/zz32'
> forked, name='/home/eyal/zz32', pid=10148
> ==10148== Thread 2:
> ==10148== Invalid read of size 1
> ==10148== at 0x1B9BF6A9: _IO_vfprintf (in /lib/tls/libc-2.3.2.so)
> ==10148== by 0x1B9C11EB: (within /lib/tls/libc-2.3.2.so)
> ==10148== Address 0x52BFED94 is not stack'd, malloc'd or (recently) free'd
> ==10148==
> ==10148== Thread 2:
> ==10148== Invalid read of size 1
> ==10148== at 0x1B9E6A20: _IO_default_xsputn (in /lib/tls/libc-2.3.2.so)
> ==10148== Address 0x52BFED94 is not stack'd, malloc'd or (recently) free'd
> forked, name='/home/eyal/zz32', pid=0
I think this is just another case of the environment problem
you reported on the bug tracker - some data from the parent is
not being considered as accessible in the child for some reason.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Tom H. <th...@cy...> - 2004-11-06 11:07:05
|
In message <dec...@lo...>
Tom Hughes <th...@cy...> wrote:
> In message <418...@ey...>
> Eyal Lebedinsky <ey...@ey...> wrote:
>
> > The small attached script demonstrates the error. I get this output,
> > note the "Invalid read of size 1" errors. The parent printf is good,
> > the child provokes an error.
>
> I think this is just another case of the environment problem
> you reported on the bug tracker - some data from the parent is
> not being considered as accessible in the child for some reason.
Apologies - it was somebody else that raised that bug. It was just
coincindce that you reported it here within a few hours of the bug
being raised...
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|