[mercury-users] Valgrind -- works and reports bugs in a hello_world
Ondrej Bojar
oboj7042 at ss1000.ms.mff.cuni.cz
Fri Mar 28 20:09:05 AEDT 2003
On Fri, 28 Mar 2003, Fergus Henderson wrote:
> On 28-Mar-2003, Ondrej Bojar <oboj7042 at ss1000.ms.mff.cuni.cz> wrote:
> I have no idea how valgrind works... but try using `--shared'.
Thanks. Using MLFLAGS=... --shared ... enables valgrind to observe memory
misuse.
For a 'main-->io__write_string("Hello.\n")' program are there 155 errors
reported. Is this all right? :-)
(The same errors are reported, even if I use the suggested
--workaround-gcc296-bugs=yes option of valgrind.)
Here is the output for those, who are interested:
klokan:clipmerc$valgrind hello
==6711== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==6711== Copyright (C) 2002, and GNU GPL'd, by Julian Seward.
==6711== Using valgrind-1.9.4, a program instrumentation system for
x86-linux.
==6711== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==6711== Estimated CPU clock rate is 704 MHz
==6711== For more details, rerun with: -v
==6711==
==6711== Conditional jump or move depends on uninitialised value(s)
==6711== at 0x4035373C: GC_push_all_eager (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
==6711== by 0x403537C9: GC_push_all_stack_partially_eager (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
==6711== by 0x40351B93: GC_push_current_stack (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
==6711== by 0x40350A73: GC_generic_push_regs (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
==6711==
==6711== Conditional jump or move depends on uninitialised value(s)
==6711== at 0x40353741: GC_push_all_eager (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
==6711== by 0x403537C9: GC_push_all_stack_partially_eager (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
==6711== by 0x40351B93: GC_push_current_stack (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
==6711== by 0x40350A73: GC_generic_push_regs (in
/usr/local/mercury-rotd-2003-03-03/lib/mercury/lib/i686-pc-linux-gnu/libgc.so)
Hello.
==6711==
==6711== ERROR SUMMARY: 155 errors from 2 contexts (suppressed: 0 from 0)
==6711== malloc/free: in use at exit: 728 bytes in 2 blocks.
==6711== malloc/free: 2 allocs, 0 frees, 728 bytes allocated.
==6711== For a detailed leak analysis, rerun with: --leak-check=yes
==6711== For counts of detected errors, rerun with: -v
Cheers, Andrew.
>
>
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list