[svn:parrot] r41783 - branches/pcc_reapply/src
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Sat Oct 10 00:59:55 UTC 2009
Author: chromatic
Date: Sat Oct 10 00:59:54 2009
New Revision: 41783
URL: https://trac.parrot.org/parrot/changeset/41783
Log:
[pcc] Initialized the PMC return value in run_sub() to PMCNULL explicitly.
This way, when PCC doesn't set a return value in those cases where the invoked
sub doesn't have a return value, the return value will be PMCNULL, not whatever
random junk is on the stack that is almost assuredly not a -- and is definitely
not the -- valid PMC.
Modified:
branches/pcc_reapply/src/packfile.c
Modified: branches/pcc_reapply/src/packfile.c
==============================================================================
--- branches/pcc_reapply/src/packfile.c Sat Oct 10 00:46:14 2009 (r41782)
+++ branches/pcc_reapply/src/packfile.c Sat Oct 10 00:59:54 2009 (r41783)
@@ -667,7 +667,7 @@
{
ASSERT_ARGS(run_sub)
Parrot_runcore_t *old_core = interp->run_core;
- PMC *retval;
+ PMC *retval = PMCNULL;
/* turn off JIT and prederef - both would act on the whole
* PackFile which probably isn't worth the effort */
More information about the parrot-commits
mailing list