diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-02-12 13:15:20 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-03-19 20:16:53 +0000 |
commit | dbadabac3485b259e6be66dfb16a9479eb1fabda (patch) | |
tree | a258fdab9a457667eab7cbd35535cd46456e4a08 /pp_sys.c | |
parent | 2adc30dde2b5718f011d803b7b56d68ee31a8a0e (diff) | |
download | perl-dbadabac3485b259e6be66dfb16a9479eb1fabda.tar.gz |
assert() that every NN argument is not NULL. Otherwise we have the
ability to create landmines that will explode under someone in the
future when they upgrade their compiler to one with better
optimisation. We've already done this at least twice.
(Yes, some of the assertions are after code that would already have
SEGVd because it already deferences a pointer, but they are put in
to make it easier to automate checking that each and every case is
covered.)
Add a tool, checkARGS_ASSERT.pl, to check that every case is covered.
p4raw-id: //depot/perl@33291
(cherry-picked from commit 7918f24d20384771923d344a382e1d16d9552018)
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1247,6 +1247,8 @@ S_doform(pTHX_ CV *cv, GV *gv, OP *retop) register PERL_CONTEXT *cx; const I32 gimme = GIMME_V; + PERL_ARGS_ASSERT_DOFORM; + ENTER; SAVETMPS; @@ -3605,6 +3607,8 @@ S_dooneliner(pTHX_ const char *cmd, const char *filename) int anum = 1; Size_t size = strlen(cmd) + (strlen(filename) * 2) + 10; + PERL_ARGS_ASSERT_DOONELINER; + Newx(cmdline, size, char); my_strlcpy(cmdline, cmd, size); my_strlcat(cmdline, " ", size); @@ -4612,6 +4616,8 @@ S_space_join_names_mortal(pTHX_ char *const *array) { SV *target; + PERL_ARGS_ASSERT_SPACE_JOIN_NAMES_MORTAL; + if (array && *array) { target = newSVpvs_flags("", SVs_TEMP); while (1) { |