[Fluxus] couple of editor fixes

Kassen signal.automatique at gmail.com
Wed Apr 27 15:43:27 PDT 2011


>
>
> One thing I would recommend is running valgrind on fluxus to check for
> hidden memory problems, especially for the fragile editor code.
>
>
Ok, I ran it according to the quick-check guidelines and it quit on it's own
before the Fluxus screen appeared. That doesn't bode well. Oddly the last
issue (the cause of me not getting into Fluxus?) is actually a NVidea issue.
I'm pasting the result below, some issues look familiar others make little
sense at all to me. This is based on my binary which is exactly at the state
of the redacted branch currently in Git. I don't think I tweaked more.

Yours,
Kas.

zach at Carillon:~$ valgrind --leak-check=yes fluxus
==3173== Memcheck, a memory error detector
==3173== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==3173== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
copyright info
==3173== Command: fluxus
==3173==
==3173== Invalid write of size 4
==3173==    at 0x4510C86: scheme_hash_set (hash.c:345)
==3173==    by 0x4589037: module_execute (module.c:5265)
==3173==    by 0x44C9ED3: scheme_do_eval (eval.c:9707)
==3173==    by 0x44EE351: force_values (fun.c:2400)
==3173==    by 0x44EE4D6: scheme_force_value_same_mark (fun.c:2434)
==3173==    by 0x4522AA4: ts_scheme_force_value_same_mark (jit_ts.c:20)
==3173==    by 0x4033BDB: ???
==3173==    by 0x44CA85B: scheme_do_eval (eval.c:9488)
==3173==    by 0x44CC58D: _scheme_apply_multi_from_native (schnapp.inc:84)
==3173==    by 0x4522845: ts__scheme_apply_multi_from_native (jit_ts.c:17)
==3173==    by 0x402C8DC: ???
==3173==    by 0x44CA85B: scheme_do_eval (eval.c:9488)
==3173==  Address 0x26 is not stack'd, malloc'd or (recently) free'd
==3173==
SIGSEGV MAPERR si_code 1 fault on addr 0x26
==3173==
==3173== HEAP SUMMARY:
==3173==     in use at exit: 2,367,066 bytes in 1,593 blocks
==3173==   total heap usage: 1,612 allocs, 19 frees, 2,374,270 bytes
allocated
==3173==
==3173== 24 bytes in 1 blocks are definitely lost in loss record 1,196 of
1,310
==3173==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==3173==    by 0x468DDB9: ofm_malloc (newgc.c:293)
==3173==    by 0x468DE00: ofm_malloc_zero (newgc.c:300)
==3173==    by 0x44FDF0F: make_prim_closure (fun.c:662)
==3173==    by 0x44FE15E: scheme_make_folding_prim (fun.c:734)
==3173==    by 0x449A1B1: scheme_init_char (char.c:125)
==3173==    by 0x44A715F: scheme_engine_instance_init (env.c:641)
==3173==    by 0x44AC904: scheme_basic_env (env.c:281)
==3173==    by 0x805651E: fluxus::Interpreter::Initialise()
(Interpreter.cpp:83)
==3173==    by 0x8063D40: run(void*) (main.cpp:266)
==3173==    by 0x44920B4: scheme_main_stack_setup (salloc.c:183)
==3173==    by 0x8061FE0: main (main.cpp:433)
==3173==
==3173== 48 bytes in 1 blocks are possibly lost in loss record 1,272 of
1,310
==3173==    at 0x4026351: operator new(unsigned int)
(vg_replace_malloc.c:255)
==3173==    by 0x4A35407: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>::_Rep::_S_create(unsigned int, unsigned int, std::allocator<wchar_t>
const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A376A3: wchar_t* std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct<wchar_t
const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t> const&,
std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A37E84: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(wchar_t
const*, std::allocator<wchar_t> const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x8056C97: global constructors keyed to Repl.cpp
(Repl.cpp:31)
==3173==    by 0x8064A2C: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x804E897: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x8064968: __libc_csu_init (in /usr/local/bin/fluxus)
==3173==    by 0x4AD7C84: (below main) (libc-start.c:185)
==3173==
==3173== 100 bytes in 1 blocks are possibly lost in loss record 1,282 of
1,310
==3173==    at 0x4026351: operator new(unsigned int)
(vg_replace_malloc.c:255)
==3173==    by 0x4A35407: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>::_Rep::_S_create(unsigned int, unsigned int, std::allocator<wchar_t>
const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A376A3: wchar_t* std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct<wchar_t
const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t> const&,
std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A37E84: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(wchar_t
const*, std::allocator<wchar_t> const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x80620D6: global constructors keyed to main.cpp
(main.cpp:40)
==3173==    by 0x8064A2C: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x804E897: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x8064968: __libc_csu_init (in /usr/local/bin/fluxus)
==3173==    by 0x4AD7C84: (below main) (libc-start.c:185)
==3173==
==3173== 108 bytes in 1 blocks are possibly lost in loss record 1,285 of
1,310
==3173==    at 0x4026351: operator new(unsigned int)
(vg_replace_malloc.c:255)
==3173==    by 0x4A35407: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>::_Rep::_S_create(unsigned int, unsigned int, std::allocator<wchar_t>
const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A376A3: wchar_t* std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct<wchar_t
const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t> const&,
std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A37E84: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(wchar_t
const*, std::allocator<wchar_t> const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x806206C: global constructors keyed to main.cpp
(main.cpp:38)
==3173==    by 0x8064A2C: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x804E897: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x8064968: __libc_csu_init (in /usr/local/bin/fluxus)
==3173==    by 0x4AD7C84: (below main) (libc-start.c:185)
==3173==
==3173== 108 bytes in 1 blocks are possibly lost in loss record 1,286 of
1,310
==3173==    at 0x4026351: operator new(unsigned int)
(vg_replace_malloc.c:255)
==3173==    by 0x4A35407: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>::_Rep::_S_create(unsigned int, unsigned int, std::allocator<wchar_t>
const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A376A3: wchar_t* std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct<wchar_t
const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t> const&,
std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A37E84: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(wchar_t
const*, std::allocator<wchar_t> const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x80620A1: global constructors keyed to main.cpp
(main.cpp:39)
==3173==    by 0x8064A2C: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x804E897: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x8064968: __libc_csu_init (in /usr/local/bin/fluxus)
==3173==    by 0x4AD7C84: (below main) (libc-start.c:185)
==3173==
==3173== 132 bytes in 1 blocks are possibly lost in loss record 1,288 of
1,310
==3173==    at 0x4026351: operator new(unsigned int)
(vg_replace_malloc.c:255)
==3173==    by 0x4A35407: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>::_Rep::_S_create(unsigned int, unsigned int, std::allocator<wchar_t>
const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A376A3: wchar_t* std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct<wchar_t
const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t> const&,
std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A37E84: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(wchar_t
const*, std::allocator<wchar_t> const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x806210B: global constructors keyed to main.cpp
(main.cpp:41)
==3173==    by 0x8064A2C: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x804E897: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x8064968: __libc_csu_init (in /usr/local/bin/fluxus)
==3173==    by 0x4AD7C84: (below main) (libc-start.c:185)
==3173==
==3173== 168 bytes in 1 blocks are possibly lost in loss record 1,290 of
1,310
==3173==    at 0x4024F12: calloc (vg_replace_malloc.c:467)
==3173==    by 0x40117CB: _dl_allocate_tls (dl-tls.c:300)
==3173==    by 0x40466A9: pthread_create@@GLIBC_2.1 (allocatestack.c:570)
==3173==    by 0x45B2F11: scheme_kickoff_green_thread_time_slice_timer
(port.c:8937)
==3173==    by 0x466B9A2: scheme_thread_block (thread.c:4448)
==3173==    by 0x466E439: scheme_out_of_fuel (thread.c:3762)
==3173==    by 0x45EA31F: read_inner_inner (read.c:945)
==3173==    by 0x45F108D: _internal_read (read.c:2465)
==3173==    by 0x45F158C: scheme_internal_read (read.c:2557)
==3173==    by 0x4498B56: scheme_eval_compiled_sized_string_with_magic
(builtin.c:50)
==3173==    by 0x4498C12: scheme_eval_compiled_sized_string (builtin.c:62)
==3173==    by 0x4498C74: scheme_add_embedded_builtins (cstartup.inc:101)
==3173==
==3173== 180 bytes in 1 blocks are possibly lost in loss record 1,292 of
1,310
==3173==    at 0x4026351: operator new(unsigned int)
(vg_replace_malloc.c:255)
==3173==    by 0x4A35407: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>::_Rep::_S_create(unsigned int, unsigned int, std::allocator<wchar_t>
const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A376A3: wchar_t* std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct<wchar_t
const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t> const&,
std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A37E84: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(wchar_t
const*, std::allocator<wchar_t> const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x8056C62: global constructors keyed to Repl.cpp
(Repl.cpp:30)
==3173==    by 0x8064A2C: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x804E897: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x8064968: __libc_csu_init (in /usr/local/bin/fluxus)
==3173==    by 0x4AD7C84: (below main) (libc-start.c:185)
==3173==
==3173== 192 bytes in 8 blocks are definitely lost in loss record 1,293 of
1,310
==3173==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==3173==    by 0x468DDB9: ofm_malloc (newgc.c:293)
==3173==    by 0x468DE00: ofm_malloc_zero (newgc.c:300)
==3173==    by 0x44FDF0F: make_prim_closure (fun.c:662)
==3173==    by 0x44FE289: scheme_make_prim (fun.c:710)
==3173==    by 0x44FE32E: do_call_with_prompt (fun.c:7245)
==3173==    by 0x456EBFD: scheme_module_run_finish (module.c:4674)
==3173==    by 0x402F38A: ???
==3173==    by 0x4513AF7: scheme_module_run_start (jit.c:14901)
==3173==    by 0x456AA8A: eval_module_body (module.c:4564)
==3173==    by 0x456AB6B: do_start_module (module.c:4376)
==3173==    by 0x457C462: start_module (module.c:4450)
==3173==
==3173== 295 bytes in 1 blocks are possibly lost in loss record 1,295 of
1,310
==3173==    at 0x4026351: operator new(unsigned int)
(vg_replace_malloc.c:255)
==3173==    by 0x4A20914: std::string::_Rep::_S_create(unsigned int,
unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A22B63: char* std::string::_S_construct<char const*>(char
const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)
(in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x4A232F4: std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(char const*, std::allocator<char>
const&) (in /usr/lib/libstdc++.so.6.0.14)
==3173==    by 0x8055862: global constructors keyed to Interpreter.cpp
(Interpreter.cpp:49)
==3173==    by 0x8064A2C: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x804E897: ??? (in /usr/local/bin/fluxus)
==3173==    by 0x8064968: __libc_csu_init (in /usr/local/bin/fluxus)
==3173==    by 0x4AD7C84: (below main) (libc-start.c:185)
==3173==
==3173== 8,192 bytes in 1 blocks are definitely lost in loss record 1,303 of
1,310
==3173==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==3173==    by 0x468E364: initialize_signal_handler (sighand.c:187)
==3173==    by 0x46932CE: GC_init_type_tags (newgc.c:2408)
==3173==    by 0x4491FA5: scheme_set_stack_base (salloc.c:107)
==3173==    by 0x44920AB: scheme_main_stack_setup (salloc.c:179)
==3173==    by 0x8061FE0: main (main.cpp:433)
==3173==
==3173== 111,763 bytes in 1 blocks are possibly lost in loss record 1,308 of
1,310
==3173==    at 0x4024F12: calloc (vg_replace_malloc.c:467)
==3173==    by 0x5BC0C60: ??? (in
/usr/lib/nvidia-current/libnvidia-glcore.so.260.19.06)
==3173==    by 0x400E808: _dl_init (dl-init.c:134)
==3173==    by 0x400088E: ??? (in /lib/ld-2.12.1.so)
==3173==
==3173== LEAK SUMMARY:
==3173==    definitely lost: 8,408 bytes in 10 blocks
==3173==    indirectly lost: 0 bytes in 0 blocks
==3173==      possibly lost: 112,902 bytes in 9 blocks
==3173==    still reachable: 2,245,756 bytes in 1,574 blocks
==3173==         suppressed: 0 bytes in 0 blocks
==3173== Reachable blocks (those to which a pointer was found) are not
shown.
==3173== To see them, rerun with: --leak-check=full --show-reachable=yes
==3173==
==3173== For counts of detected and suppressed errors, rerun with: -v
==3173== ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 99 from 10)
Killed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20110428/0dacb8f4/attachment.html>


More information about the Fluxus mailing list