nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

no DESTROY when using -O3 #280

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

> perlcc -O3 -r -e 'package M; $| = 1; sub DESTROY {eval {die qq{Farewell 
$_[0]}}; print $@} package main; bless \$A::B, q{M}; *A:: = \*B::; print 
ref(\$A::B)."\n";'

What is the expected output? What do you see instead?

works without -O3

> perlcc -r -e 'package M; $| = 1; sub DESTROY {eval {die qq{Farewell $_[0]}}; 
print $@} package main; bless \$A::B, q{M}; *A:: = \*B::; print 
ref(\$A::B)."\n";'
M
Farewell M=SCALAR(0x81136a0) at -e line 1.

> perl -e 'package M; $| = 1; sub DESTROY {eval {die qq{Farewell $_[0]}}; print 
$@} package main; bless \$A::B, q{M}; *A:: = \*B::; print ref(\$A::B)."\n";'
M
Farewell M=SCALAR(0x9ec0c04) at -e line 1

Please use labels and text to provide additional information.

Original issue reported on code.google.com by nicolas....@gmail.com on 24 Jan 2014 at 12:36

GoogleCodeExporter commented 9 years ago
The main DESTROY problems are still handled in #197. This is probably only a 
string issue.

Original comment by reini.urban on 24 Jan 2014 at 6:06

GoogleCodeExporter commented 9 years ago
adjusted testcase 280 in t/testc.sh.

package DESTROY is handled in #197
and the glob_assign_glob hek assertion in #282

Original comment by reini.urban on 28 Jan 2014 at 5:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by reini.urban on 11 Feb 2014 at 9:58

GoogleCodeExporter commented 9 years ago
Fixed with 1.45_01 commit 9c51af995db41599c04523885243aab02ed10c75
Author: Reini Urban <rurban@cpanel.net>
Date:   Tue Feb 11 15:32:57 2014 -0600

    C: reimplement S_curse without sv_clear, fixed most global destruction issues

    sv_clear did too much on -O3, so reimplement the DESTROY method call only,
    use it only for the static blessed SVs.
    The global destruction tests pass now, but still too unstable.

    -DP prints also cow=0|1

Original comment by reini.urban on 11 Feb 2014 at 9:59

GoogleCodeExporter commented 9 years ago
and the 2 missing phases DESTRUCT and END fixed with 49bd0302 (1.45_08)

Original comment by reini.urban on 6 May 2014 at 6:43