lua-users home
lua-l archive

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


On Fri, 19 Aug 2011 17:37:14 +0200, Mike Pall wrote:
Pierre Chapuis wrote:

I have attached to this email the result of a Valgrind run
with -O3 -O-fwd (works) and another one with -O3 only
(does not work).

As I said: better compile a 32 bit binary, since Valgrind isn't
nearly as useful without -DLUAJIT_USE_SYSMALLOC.

Same thing on a 32 bits machine. The bug is still there but
Valgrind apparently sees nothing (see attached files).

--
Pierre 'catwell' Chapuis
==11312== Memcheck, a memory error detector
==11312== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==11312== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==11312== Command: /usr/local/bin/luajit -O3 -O-fwd -lluarocks.loader run.lua
==11312==
--11312-- Valgrind options:
--11312--    -v
--11312--    --track-origins=yes
--11312--    --suppressions=/home/ec2-user/build/luajit-2.0/src/lj.supp
--11312-- Contents of /proc/version:
--11312--   Linux version 2.6.35.11-83.9.amzn1.i686 (mockbuild@build-31004.build) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Sat Feb 19 23:41:56 UTC 2011
--11312-- Arch and hwcaps: X86, x86-sse1-sse2
--11312-- Page sizes: currently 4096, max supported 4096
--11312-- Valgrind library directory: /usr/lib/valgrind
--11312-- Reading syms from /lib/ld-2.12.so (0x4000000)
--11312-- Reading syms from /usr/local/bin/luajit-2.0.0-beta8 (0x8048000)
--11312-- Reading syms from /usr/lib/valgrind/memcheck-x86-linux (0x38000000)
--11312--    object doesn't have a dynamic symbol table
--11312-- Reading suppressions file: /home/ec2-user/build/luajit-2.0/src/lj.supp
--11312-- Reading suppressions file: /usr/lib/valgrind/default.supp
--11312-- REDIR: 0x40178c0 (index) redirected to 0x3803e023 (vgPlain_x86_linux_REDIR_FOR_index)
--11312-- Reading syms from /usr/lib/valgrind/vgpreload_core-x86-linux.so (0x4021000)
--11312-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so (0x4023000)
==11312== WARNING: new redirection conflicts with existing -- ignoring it
--11312--     new: 0x040178c0 (index               ) R-> 0x04026900 index
--11312-- REDIR: 0x4017a90 (strlen) redirected to 0x4026d20 (strlen)
--11312-- Reading syms from /lib/libm-2.12.so (0x402f000)
--11312-- Reading syms from /lib/libdl-2.12.so (0x4059000)
--11312-- Reading syms from /lib/libgcc_s-4.4.4-20100726.so.1 (0x405e000)
--11312--    object doesn't have a symbol table
--11312-- Reading syms from /lib/libc-2.12.so (0x407d000)
--11312-- REDIR: 0x40f47f0 (rindex) redirected to 0x4026780 (rindex)
--11312-- REDIR: 0x40f0b60 (realloc) redirected to 0x4025bee (realloc)
--11312-- REDIR: 0x40f6120 (memset) redirected to 0x40280d0 (memset)
--11312-- REDIR: 0x40f06e0 (free) redirected to 0x4025759 (free)
--11312-- REDIR: 0x40f65d0 (memcpy) redirected to 0x40274a0 (memcpy)
--11312-- REDIR: 0x40f43c0 (strlen) redirected to 0x4026ce0 (strlen)
--11312-- REDIR: 0x40f3ce0 (index) redirected to 0x4026870 (index)
--11312-- REDIR: 0x40f45a0 (strncmp) redirected to 0x4027200 (strncmp)
--11312-- REDIR: 0x4018130 (stpcpy) redirected to 0x4027f10 (stpcpy)
--11312-- REDIR: 0x40efb10 (malloc) redirected to 0x4025b3f (malloc)
--11312-- REDIR: 0x40f62c0 (stpcpy) redirected to 0x4027d50 (stpcpy)
--11312-- REDIR: 0x40f6180 (mempcpy) redirected to 0x4028230 (mempcpy)
--11312-- REDIR: 0x40ef800 (calloc) redirected to 0x4024e4f (calloc)
--11312-- Reading syms from /usr/local/lib/lua/5.1/lfs.so (0x402a000)
--11312-- Reading syms from /usr/local/lib/lua/5.1/limlib2.so (0x45f5000)
--11312-- Reading syms from /usr/local/lib/libImlib2.so.1.4.4 (0x4602000)
--11312-- Reading syms from /usr/lib/libfreetype.so.6.3.22 (0x4645000)
--11312--    object doesn't have a symbol table
--11312-- REDIR: 0x40f4680 (strncpy) redirected to 0x4026f20 (strncpy)
--11312-- REDIR: 0x40f90a0 (strchrnul) redirected to 0x40281c0 (strchrnul)
--11312-- REDIR: 0x40f60b0 (memmove) redirected to 0x4028140 (memmove)
--11312-- REDIR: 0x40f3e50 (strcmp) redirected to 0x40272e0 (strcmp)
--11312-- Reading syms from /usr/local/lib/imlib2/loaders/zlib.so (0x45fd000)
--11312-- Reading syms from /lib/libz.so.1.2.3 (0x46dc000)
--11312--    object doesn't have a symbol table
--11312-- Reading syms from /usr/local/lib/imlib2/loaders/xpm.so (0x46d7000)
--11312-- Reading syms from /usr/local/lib/imlib2/loaders/tga.so (0x45ff000)
--11312-- Reading syms from /usr/local/lib/imlib2/loaders/pnm.so (0x46ef000)
--11312-- Reading syms from /usr/local/lib/imlib2/loaders/lbm.so (0x46f3000)
--11312-- Reading syms from /usr/local/lib/imlib2/loaders/bmp.so (0x46f6000)
--11312-- Reading syms from /usr/local/lib/imlib2/loaders/argb.so (0x46fa000)
--11312-- Discarding syms at 0x45f738c-0x45fa9d8 in /usr/local/lib/lua/5.1/limlib2.so due to munmap()
--11312-- Discarding syms at 0x402af40-0x402c438 in /usr/local/lib/lua/5.1/lfs.so due to munmap()
==11312==
==11312== HEAP SUMMARY:
==11312==     in use at exit: 153,503 bytes in 95 blocks
==11312==   total heap usage: 875,583 allocs, 875,488 frees, 16,501,087 bytes allocated
==11312==
==11312== Searching for pointers to 95 not-freed blocks
==11312== Checked 336,428 bytes
==11312==
==11312== LEAK SUMMARY:
==11312==    definitely lost: 0 bytes in 0 blocks
==11312==    indirectly lost: 0 bytes in 0 blocks
==11312==      possibly lost: 660 bytes in 12 blocks
==11312==    still reachable: 152,843 bytes in 83 blocks
==11312==         suppressed: 0 bytes in 0 blocks
==11312== Rerun with --leak-check=full to see details of leaked memory
==11312==
==11312== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 33472 from 130)
--11312--
--11312-- used_suppression:  14647 Optimized string compare
--11312-- used_suppression:  18746 Optimized string compare
--11312-- used_suppression:     79 dl-hack3-cond-1
==11312==
==11312== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 33472 from 130)
==11296== Memcheck, a memory error detector
==11296== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==11296== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==11296== Command: /usr/local/bin/luajit -O3 -lluarocks.loader run.lua
==11296==
--11296-- Valgrind options:
--11296--    -v
--11296--    --track-origins=yes
--11296--    --suppressions=/home/ec2-user/build/luajit-2.0/src/lj.supp
--11296-- Contents of /proc/version:
--11296--   Linux version 2.6.35.11-83.9.amzn1.i686 (mockbuild@build-31004.build) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Sat Feb 19 23:41:56 UTC 2011
--11296-- Arch and hwcaps: X86, x86-sse1-sse2
--11296-- Page sizes: currently 4096, max supported 4096
--11296-- Valgrind library directory: /usr/lib/valgrind
--11296-- Reading syms from /lib/ld-2.12.so (0x4000000)
--11296-- Reading syms from /usr/local/bin/luajit-2.0.0-beta8 (0x8048000)
--11296-- Reading syms from /usr/lib/valgrind/memcheck-x86-linux (0x38000000)
--11296--    object doesn't have a dynamic symbol table
--11296-- Reading suppressions file: /home/ec2-user/build/luajit-2.0/src/lj.supp
--11296-- Reading suppressions file: /usr/lib/valgrind/default.supp
--11296-- REDIR: 0x40178c0 (index) redirected to 0x3803e023 (vgPlain_x86_linux_REDIR_FOR_index)
--11296-- Reading syms from /usr/lib/valgrind/vgpreload_core-x86-linux.so (0x4021000)
--11296-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so (0x4023000)
==11296== WARNING: new redirection conflicts with existing -- ignoring it
--11296--     new: 0x040178c0 (index               ) R-> 0x04026900 index
--11296-- REDIR: 0x4017a90 (strlen) redirected to 0x4026d20 (strlen)
--11296-- Reading syms from /lib/libm-2.12.so (0x402f000)
--11296-- Reading syms from /lib/libdl-2.12.so (0x4059000)
--11296-- Reading syms from /lib/libgcc_s-4.4.4-20100726.so.1 (0x405e000)
--11296--    object doesn't have a symbol table
--11296-- Reading syms from /lib/libc-2.12.so (0x407d000)
--11296-- REDIR: 0x40f47f0 (rindex) redirected to 0x4026780 (rindex)
--11296-- REDIR: 0x40f0b60 (realloc) redirected to 0x4025bee (realloc)
--11296-- REDIR: 0x40f6120 (memset) redirected to 0x40280d0 (memset)
--11296-- REDIR: 0x40f06e0 (free) redirected to 0x4025759 (free)
--11296-- REDIR: 0x40f65d0 (memcpy) redirected to 0x40274a0 (memcpy)
--11296-- REDIR: 0x40f43c0 (strlen) redirected to 0x4026ce0 (strlen)
--11296-- REDIR: 0x40f3ce0 (index) redirected to 0x4026870 (index)
--11296-- REDIR: 0x4018130 (stpcpy) redirected to 0x4027f10 (stpcpy)
--11296-- REDIR: 0x40efb10 (malloc) redirected to 0x4025b3f (malloc)
--11296-- REDIR: 0x40f45a0 (strncmp) redirected to 0x4027200 (strncmp)
--11296-- REDIR: 0x40f62c0 (stpcpy) redirected to 0x4027d50 (stpcpy)
--11296-- REDIR: 0x40f6180 (mempcpy) redirected to 0x4028230 (mempcpy)
--11296-- REDIR: 0x40ef800 (calloc) redirected to 0x4024e4f (calloc)
--11296-- Reading syms from /usr/local/lib/lua/5.1/lfs.so (0x402a000)
--11296-- REDIR: 0x40f5dc0 (bcmp) redirected to 0x4027cb0 (bcmp)
--11296-- Reading syms from /usr/local/lib/lua/5.1/limlib2.so (0x45f5000)
--11296-- Reading syms from /usr/local/lib/libImlib2.so.1.4.4 (0x4602000)
--11296-- Reading syms from /usr/lib/libfreetype.so.6.3.22 (0x4645000)
--11296--    object doesn't have a symbol table
--11296-- REDIR: 0x40f4680 (strncpy) redirected to 0x4026f20 (strncpy)
--11296-- REDIR: 0x40f90a0 (strchrnul) redirected to 0x40281c0 (strchrnul)
--11296-- REDIR: 0x40f60b0 (memmove) redirected to 0x4028140 (memmove)
--11296-- REDIR: 0x40f3e50 (strcmp) redirected to 0x40272e0 (strcmp)
--11296-- Reading syms from /usr/local/lib/imlib2/loaders/zlib.so (0x45fd000)
--11296-- Reading syms from /lib/libz.so.1.2.3 (0x46dc000)
--11296--    object doesn't have a symbol table
--11296-- Reading syms from /usr/local/lib/imlib2/loaders/xpm.so (0x46d7000)
--11296-- Reading syms from /usr/local/lib/imlib2/loaders/tga.so (0x45ff000)
--11296-- Reading syms from /usr/local/lib/imlib2/loaders/pnm.so (0x46ef000)
--11296-- Reading syms from /usr/local/lib/imlib2/loaders/lbm.so (0x46f3000)
--11296-- Reading syms from /usr/local/lib/imlib2/loaders/bmp.so (0x46f6000)
--11296-- Reading syms from /usr/local/lib/imlib2/loaders/argb.so (0x46fa000)
--11296-- Discarding syms at 0x45f738c-0x45fa9d8 in /usr/local/lib/lua/5.1/limlib2.so due to munmap()
--11296-- Discarding syms at 0x402af40-0x402c438 in /usr/local/lib/lua/5.1/lfs.so due to munmap()
==11296==
==11296== HEAP SUMMARY:
==11296==     in use at exit: 153,503 bytes in 95 blocks
==11296==   total heap usage: 147,551 allocs, 147,456 frees, 7,690,196 bytes allocated
==11296==
==11296== Searching for pointers to 95 not-freed blocks
==11296== Checked 336,412 bytes
==11296==
==11296== LEAK SUMMARY:
==11296==    definitely lost: 0 bytes in 0 blocks
==11296==    indirectly lost: 0 bytes in 0 blocks
==11296==      possibly lost: 660 bytes in 12 blocks
==11296==    still reachable: 152,843 bytes in 83 blocks
==11296==         suppressed: 0 bytes in 0 blocks
==11296== Rerun with --leak-check=full to see details of leaked memory
==11296==
==11296== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 33663 from 130)
--11296--
--11296-- used_suppression:  14741 Optimized string compare
--11296-- used_suppression:  18843 Optimized string compare
--11296-- used_suppression:     79 dl-hack3-cond-1
==11296==
==11296== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 33663 from 130)