diff options
author | Doug Bell <madcityzen@gmail.com> | 2015-06-02 22:34:42 -0500 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2015-10-02 11:29:35 +0100 |
commit | 9e77582c6bb40536b9ca4037729a9b0f2c7ff932 (patch) | |
tree | c7d6c93e6091f38e95f800db551be00b1b7bf68a /XSUB.h | |
parent | 052a7c766b9640ee847979cb9d2351a63e23a378 (diff) | |
download | perl-9e77582c6bb40536b9ca4037729a9b0f2c7ff932.tar.gz |
add assertion to prevent stack corruption in XSUB
We should not be able to return negative offsets from the stack in
XSUBs.
Diffstat (limited to 'XSUB.h')
-rw-r--r-- | XSUB.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -327,6 +327,7 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">. #define XSRETURN(off) \ STMT_START { \ const IV tmpXSoff = (off); \ + assert(tmpXSoff >= 0);\ PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); \ return; \ } STMT_END |