develooper Front page | perl.perl5.porters | Postings from August 2001

perlio problems

Thread Next
Doug MacEachern
August 5, 2001 19:59
perlio problems
Message ID:
there are a few problems i currently see with perlio.  first is that
embedded apps will leak because PerlIO_destruct() only cleans out Perl
objects (from PerlIO::Via), leaking whats left in _perlio, _perlio
itself, PerlIO_known_layers and PerlIO_def_layerlist.  this is not
noticed when everything is linked static, since perlio does something
like 'if (!_perlio) allocate _perlio'.  but when libperl is in a
shared library, such as that is dlopened/dlclosed each
time apache restarts, the leakage is visible.

in addition perlio does not mix well with ithreads and perl_clone.
PerlIO_list_t->array[x].arg is an SV*.  for most layers that is just a
string, i'm not sure when it would be something other than a string.
but these SVs currently live in perlio globals, these SVs cannot be
shared between interpreters.  the perlio global structures (_perlio,
PerlIO_known_layers and PerlIO_def_layerlist) are also shared between
interpreters with no locking.

i don't understand perlio well enough to offer solutions yet, but in
the current state it is not production ready for 5.8.0

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