Changeset 6dc2d6b for perlglue.xs


Ignore:
Timestamp:
Jul 27, 2009, 11:23:57 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
6551eae
Parents:
776c4bb
git-author:
Nelson Elhage <nelhage@mit.edu> (07/25/09 23:02:48)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/27/09 23:23:57)
Message:
save_excursion: Fix perl API error.

We need to save a mark and SPAGAIN around call_* macros. The old
behavior caused out-of-bounds stack dereferences and segfaults.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    reede1bf r6dc2d6b  
    485485        {
    486486                x = owl_editwin_begin_excursion(owl_global_get_typwin(&g));
     487                PUSHMARK(SP);
    487488                count = call_sv(sub, G_SCALAR|G_EVAL|G_NOARGS);
     489                SPAGAIN;
    488490                owl_editwin_end_excursion(owl_global_get_typwin(&g), x);
    489491
     
    492494                }
    493495
    494                 SPAGAIN;
    495496                if(count == 1)
    496497                        RETVAL = SvREFCNT_inc(POPs);
Note: See TracChangeset for help on using the changeset viewer.