[Gambas-user] Sig 11

Benoit Minisini gambas at ...1...
Sun Jul 27 22:34:48 CEST 2008


On dimanche 27 juillet 2008, Laurent Carlier wrote:
> Le Sunday 27 July 2008 21:23:34 Benoit Minisini, vous avez écrit :
> > On dimanche 27 juillet 2008, Steven Lobbezoo wrote:
> > > Hi,
> > >
> > > I did as you requested (no pun intended ;-) )
> > > The output of valgrind is here :
> > > steven at ...1948...:~/request_dev> valgrind --tool=memcheck
> > > --num-callers=50 gbx2 -p
> > > ==7566== Memcheck, a memory error detector.
> > > ==7566== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward etal.
> > > ==7566== Using LibVEX rev 1804, a library for dynamic binary
> > > translation.
> > > ==7566== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
> > > ==7566== Using valgrind-3.3.0, a dynamic binary instrumentation
> > > framework.
> > > ==7566== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward etal.
> > > ==7566== For more details, rerun with: -v
> > > ==7566==
> > > ==7575==
> > > ==7575== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 140 from
> > > 2)
> > > ==7575== malloc/free: in use at exit: 1,120,546 bytes in 15,402 blocks.
> > > ==7575== malloc/free: 73,176 allocs, 57,774 frees, 6,751,684 bytes
> > > allocated.
> > > ==7575== For counts of detected errors, rerun with: -v
> > > ==7575== searching for pointers to 15,402 not-freed blocks.
> > > ==7575== checked 1,805,028 bytes.
> > > ==7575==
> > > ==7575== LEAK SUMMARY:
> > > ==7575==    definitely lost: 64,475 bytes in 1,459 blocks.
> > > ==7575==      possibly lost: 27,252 bytes in 689 blocks.
> > > ==7575==    still reachable: 1,028,819 bytes in 13,254 blocks.
> > > ==7575==         suppressed: 0 bytes in 0 blocks.
> > > ==7575== Rerun with --leak-check=full to see details of leaked memory.
> > > ==7566== Conditional jump or move depends on uninitialised value(s)
> > > ==7566==    at 0x8062A47: OBJECT_detach (gbx_object.c:121)
> > > ==7566==    by 0x8068DDB: stop_process (gbx_c_process.c:210)
> > > ==7566==    by 0x8068E81: callback_child (gbx_c_process.c:540)
> > > ==7566==    by 0x8068EC8: CPROCESS_wait_for (gbx_c_process.c:672)
> > > ==7566==    by 0x805AAAE: SUBR_exec (gbx_subr_misc.c:168)
> > > ==7566==    by 0x8050960: EXEC_loop (gbx_exec_loop.c:476)
> > > ==7566==    by 0x804EE4A: EXEC_function_loop (gbx_exec.c:702)
> > > ==7566==    by 0x804F120: EXEC_function_real (gbx_exec.c:689)
> > > ==7566==    by 0x805DE03: GB_Call (gbx_api.c:761)
> > > ==7566==    by 0x465054C: (within /usr/lib/gambas2/gb.qt.so.0.0.0)
> > > ==7566==    by 0x465060B: (within /usr/lib/gambas2/gb.qt.so.0.0.0)
> > > ==7566==    by 0x804E297: EXEC_call_native (gbx_exec.c:841)
> > > ==7566==    by 0x804EB3D: EXEC_native (gbx_exec.c:959)
> > > ==7566==    by 0x804F1D0: EXEC_spec (gbx_exec.c:1224)
> > > ==7566==    by 0x804FAEA: EXEC_push_array (gbx_exec_push.c:455)
> > > ==7566==    by 0x8050A7C: EXEC_loop (gbx_exec_loop.c:532)
> > > ==7566==    by 0x804EE4A: EXEC_function_loop (gbx_exec.c:702)
> > > ==7566==    by 0x804F120: EXEC_function_real (gbx_exec.c:689)
> > > ==7566==    by 0x804F4DC: EXEC_special_inheritance (gbx_exec.c:1310)
> > > ==7566==    by 0x8062F1B: OBJECT_create (gbx_object.c:330)
> > > ==7566==    by 0x805237A: CLASS_auto_create (gbx_class.c:1014)
> > > ==7566==    by 0x4636DB7: (within /usr/lib/gambas2/gb.qt.so.0.0.0)
> > > ==7566==    by 0x804E297: EXEC_call_native (gbx_exec.c:841)
> > > ==7566==    by 0x804EB3D: EXEC_native (gbx_exec.c:959)
> > > ==7566==    by 0x8062194: main (gbx.c:352)
> > > ==7566==
> >
> > After having installed gcc 4.3.0 on my Mandriva and just recompile the
> > interpreter, I get the same error as you and many others having gcc 4.3.
> > These errors do not appear if the interpreter is compiled without
> > optimizations, so I guess than gcc 4.3 optimizes the code differently
> > than gcc 4.2, and that these optimizations now break the code!
> >
> > I continue my investigations...
>
> All my gambas 2/3 is build with gcc 4.3 without too much complains:
> lordh at ...57...:~/Desktop/gbSVN/gambas/trunk$ gcc -v
> Using built-in specs.
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-8'
> --with- bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-
> languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-
> system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-
> threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --
> program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
> --enable-objc- gc --enable-mpfr --enable-cld --enable-checking=release
> --build=x86_64-linux- gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.3.1 (Debian 4.3.1-8)
>

On Mandriva (gcc 4.3.0), it compiles, but with new warnings on strict aliasing 
breaks. I think that the badly compiled code comes from that. I am 
searching...

-- 
Benoit Minisini




More information about the User mailing list