summaryrefslogtreecommitdiff
path: root/pod/perltodo.pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-05-10 16:40:37 +0100
committerNicholas Clark <nick@ccl4.org>2009-05-10 16:42:10 +0100
commit318bf70858c09319b660d27e01f5808b011181d3 (patch)
tree8d5464e859ac601ebe3720d8f7adf318d2f94995 /pod/perltodo.pod
parent0befdfba7e496a43f86e2109879b571806ccf83e (diff)
downloadperl-318bf70858c09319b660d27e01f5808b011181d3.tar.gz
Replacing dump.c's use of SVs as temporaries is TODO.
Diffstat (limited to 'pod/perltodo.pod')
-rw-r--r--pod/perltodo.pod21
1 files changed, 21 insertions, 0 deletions
diff --git a/pod/perltodo.pod b/pod/perltodo.pod
index 387f03b517..b01522a98d 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<dump.c> contains debugging routines to dump out the contains of perl data
+structures, such as C<SV>s, C<AV>s and C<HV>s. Currently, the dumping code
+B<uses> C<SV>s 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<dump.c>, 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<malloc>. The F<dump.c> 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 C<SV>s for
+B<its> buffers, use of which can cause problems similar to those of F<dump.c>,
+at similar times.
+
=head2 safely supporting POSIX SA_SIGINFO
Some years ago Jarkko supplied patches to provide support for the POSIX