From: Nicholas Clark Date: Sun, 10 May 2009 15:40:37 +0000 (+0100) Subject: Replacing dump.c's use of SVs as temporaries is TODO. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=318bf70858c09319b660d27e01f5808b011181d3;p=p5sagit%2Fp5-mst-13.2.git Replacing dump.c's use of SVs as temporaries is TODO. --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index 387f03b..b01522a 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -601,6 +601,27 @@ These tasks would need C knowledge, and roughly the level of knowledge of the perl API that comes from writing modules that use XS to interface to C. +=head2 Remove the use of SVs as temporaries in dump.c + +F contains debugging routines to dump out the contains of perl data +structures, such as Cs, Cs and Cs. Currently, the dumping code +B Cs for its temporary buffers, which was a logical initial +implementation choice, as they provide ready made memory handling. + +However, they also lead to a lot of confusion when it happens that what you're +trying to debug is seen by the code in F, correctly or incorrectly, as +a temporary scalar it can use for a temporary buffer. It's also not possible +to dump scalars before the interpreter is properly set up, such as during +ithreads cloning. It would be good to progressively replace the use of scalars +as string accumulation buffers with something much simpler, directly allocated +by C. The F code is (or should be) only producing 7 bit +US-ASCII, so output character sets are not an issue. + +Producing and proving an internal simple buffer allocation would make it easier +to re-write the internals of the PerlIO subsystem to avoid using Cs for +B buffers, use of which can cause problems similar to those of F, +at similar times. + =head2 safely supporting POSIX SA_SIGINFO Some years ago Jarkko supplied patches to provide support for the POSIX