Dr. Werner Fink
2014-04-14 07:27:03 UTC
Hi,
this is what valgrind shows
==23137== Invalid read of size 2
==23137== at 0x57DB446: stkclose (stk.c:312)
==23137== by 0x511CB6A: sh_funstaks (parse.c:495)
==23137== by 0x511CB99: sh_freeup (parse.c:476)
==23137== by 0x5139567: sh_eval_20120720 (xec.c:4202)
==23137== by 0x50C75C0: b_dot_cmd (misc.c:295)
==23137== by 0x5138B54: sh_exec (xec.c:1382)
==23137== by 0x50D4956: exfile (main.c:627)
==23137== by 0x50D52D9: sh_main (main.c:399)
==23137== by 0x5F17C15: (below main) (in /lib64/libc-2.11.3.so)
==23137== Address 0x62f3430 is 224 bytes inside a block of size 248 free'd
==23137== at 0x4C2852A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23137== by 0x57DBC44: stkexcept (stk.c:182)
==23137== by 0x582CCF0: sfraise (sfraise.c:90)
==23137== by 0x5812C48: sfclose (sfclose.c:160)
==23137== by 0x5113BAC: _nv_unset (name.c:2639)
==23137== by 0x50CF10F: unall (typeset.c:1285)
==23137== by 0x5138B54: sh_exec (xec.c:1382)
==23137== by 0x513346C: sh_exec (xec.c:2255)
==23137== by 0x5139409: sh_eval_20120720 (xec.c:4189)
==23137== by 0x50C75C0: b_dot_cmd (misc.c:295)
==23137== by 0x5138B54: sh_exec (xec.c:1382)
==23137== by 0x50D4956: exfile (main.c:627)
that is that in sh_eval_20120720() witin the while loop the stream is
freed by sh_exec() -> unall() -> _nv_unset() -> sfclose()
and later on after the loop with sh_freeup() -> sh_funstaks() -> stkclose()
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140414/a680459a/attachment.sig>
this is what valgrind shows
==23137== Invalid read of size 2
==23137== at 0x57DB446: stkclose (stk.c:312)
==23137== by 0x511CB6A: sh_funstaks (parse.c:495)
==23137== by 0x511CB99: sh_freeup (parse.c:476)
==23137== by 0x5139567: sh_eval_20120720 (xec.c:4202)
==23137== by 0x50C75C0: b_dot_cmd (misc.c:295)
==23137== by 0x5138B54: sh_exec (xec.c:1382)
==23137== by 0x50D4956: exfile (main.c:627)
==23137== by 0x50D52D9: sh_main (main.c:399)
==23137== by 0x5F17C15: (below main) (in /lib64/libc-2.11.3.so)
==23137== Address 0x62f3430 is 224 bytes inside a block of size 248 free'd
==23137== at 0x4C2852A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23137== by 0x57DBC44: stkexcept (stk.c:182)
==23137== by 0x582CCF0: sfraise (sfraise.c:90)
==23137== by 0x5812C48: sfclose (sfclose.c:160)
==23137== by 0x5113BAC: _nv_unset (name.c:2639)
==23137== by 0x50CF10F: unall (typeset.c:1285)
==23137== by 0x5138B54: sh_exec (xec.c:1382)
==23137== by 0x513346C: sh_exec (xec.c:2255)
==23137== by 0x5139409: sh_eval_20120720 (xec.c:4189)
==23137== by 0x50C75C0: b_dot_cmd (misc.c:295)
==23137== by 0x5138B54: sh_exec (xec.c:1382)
==23137== by 0x50D4956: exfile (main.c:627)
that is that in sh_eval_20120720() witin the while loop the stream is
freed by sh_exec() -> unall() -> _nv_unset() -> sfclose()
and later on after the loop with sh_freeup() -> sh_funstaks() -> stkclose()
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20140414/a680459a/attachment.sig>