develooper Front page | perl.perl6.internals | Postings from October 2002

[perl #18142] [PACTH] Parrot_destroy

Thread Next
Leopold Toetsch
October 29, 2002 02:44
[perl #18142] [PACTH] Parrot_destroy
Message ID:
# New Ticket Created by  Leopold Toetsch 
# Please include the string:  [perl #18142]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Attached is a (big) patch that implements Parrot_destroy.

Test results with --gc-debug: All tests successful.

Test results with leak detection[1]/--gc-debug:

Failed Test  Status Wstat Total Fail  Failed  List of failed
t/op/hacks.t                  2    1  50,00%  1
t/op/interp.t                 2    2 100,00%  1-2
t/op/rx.t                    23    7  30,43%  8-9, 12-14, 21-22
t/op/stacks.t                35    2   5,71%  31-32
t/pmc/pmc.t                  83    4   4,82%  62-64, 76
7 subtests skipped.
Failed 5/34 test scripts, 85.29% okay. 16/495 subtests failed, 96.77% okay.

Some notes WRT still exisiting leaks:

- hacks.t: PIO related, open does new_IO which doesn't seem to store
   this structure somewhere. Explicit closing the handle would help, as
   done now in embed.c
- interp.t: crashes with ATEXIT_DESTROY (2 interpreters interfere)
- rx.t:    Bitmaps leakage
- stacks.t: leaking intstack
- pmc.t:  leaking intqueue

- header file changes WRT global warnings
- probably remove intqueue from classes
- move the stack destroying code to stacks, reuse it in
- fix PIO_destroy
- to clean up properly after exceptions, I added a define locally to
   interpreter.c: ATEXT_DESTROY, which installs an atexit-handler. This
   works only for one existing interpreter, due to the __interpreter
   global. We should either keep an interpreter array or fix
   internal_exception to take an Parrot_Interp*, so that Parrot_destroy
   can be called.
- Running with --gc=malloc is broken (mostly COWed strings).

- (unrelated) mmap in Parrot_readbc is not used now, missing
   HAS_HEADER_SYSMMAN definition

Some notes to the changes:
- classe/*.pmc missing flags setting in clone, destroy
- dod.c  made free_unused_* global
- embed.c PIO_close
- headers.c honor active_destroy, destroy_headers
- chartype.c usascii (better latin1) is default
- interpreter Parrot_destroy
- io/io.c PIO_destroy / _close
- res*.c destroy_memory_pools
- t/src/manifest accout for skipped test

[1] I used run-yamd (s. attached testyamd script) for running all tests
through the memory debugger and made leaking tests fail. This is part
of YAMD (Yet Another Memory Debugger).

Please test the patch on different platforms. Mine is i386/linux.

Have fun,

-- attachment  1 ------------------------------------------------------

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About