summaryrefslogtreecommitdiff
path: root/opcode.pl
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-20 00:52:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-20 00:52:34 +0000
commit24a5db48b0d64ecc213f023de6159dcc0c095c40 (patch)
treed9cd1cb7e6fa7057e4df3c1580b5bbe2b6b5f4c9 /opcode.pl
parentbd26bcf50c20243e9eae50509576f5f3a0812e8c (diff)
downloadperl-24a5db48b0d64ecc213f023de6159dcc0c095c40.tar.gz
disable optimizing troublesome ops in change#3612
(from Ilya Zakharevich) p4raw-link: @3612 on //depot/perl: b162f9ead0a98db35cdcfc8c889e344c040c8d8e p4raw-id: //depot/perl@4415
Diffstat (limited to 'opcode.pl')
-rwxr-xr-xopcode.pl34
1 files changed, 25 insertions, 9 deletions
diff --git a/opcode.pl b/opcode.pl
index a41ef8b00a..53acd4d1a1 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -289,6 +289,10 @@ sub tab {
# lt and friends do SETs (including ncmp, but not scmp)
+# Additional mode of failure: the opcode can modify TARG before it "used"
+# all the arguments (or may call an external function which does the same).
+# If the target coincides with one of the arguments ==> kaboom.
+
# pp.c pos substr each not OK (RETPUSHUNDEF)
# substr vec also not OK due to LV to target (are they???)
# ref not OK (RETPUSHNO)
@@ -299,11 +303,21 @@ sub tab {
# sprintf: is calling do_sprintf(TARG,...) which can act on TARG
# before other args are processed.
+# Suspicious wrt "additional mode of failure" (and only it):
+# schop, chop, postinc/dec, bit_and etc, negate, complement.
+
+# Also suspicious: 4-arg substr, sprintf, uc/lc (POK_only), reverse, pack.
+
+# substr/vec: doing TAINT_off()???
+
# pp_hot.c
# readline - unknown whether it is safe
# match subst not OK (dTARG)
# grepwhile not OK (not always setting)
+# Suspicious wrt "additional mode of failure": concat (dealt with
+# in ck_sassign()), join (same).
+
# pp_ctl.c
# mapwhile flip caller not OK (not always setting)
@@ -317,6 +331,8 @@ sub tab {
# sselect shm* sem* msg* syscall - unknown whether they are safe
# gmtime not OK (list context)
+# Suspicious wrt "additional mode of failure": warn, die, select.
+
__END__
# New ops always go at the very end
@@ -382,8 +398,8 @@ trans transliteration (tr///) ck_null is" S
sassign scalar assignment ck_sassign s0
aassign list assignment ck_null t2 L L
-chop chop ck_spair mTs% L
-schop scalar chop ck_null sTu% S?
+chop chop ck_spair mts% L
+schop scalar chop ck_null stu% S?
chomp chomp ck_spair mTs% L
schomp scalar chomp ck_null sTu% S?
defined defined operator ck_defined isu% S?
@@ -395,9 +411,9 @@ preinc preincrement (++) ck_lfun dIs1 S
i_preinc integer preincrement (++) ck_lfun dis1 S
predec predecrement (--) ck_lfun dIs1 S
i_predec integer predecrement (--) ck_lfun dis1 S
-postinc postincrement (++) ck_lfun dIsT1 S
+postinc postincrement (++) ck_lfun dIst1 S
i_postinc integer postincrement (++) ck_lfun disT1 S
-postdec postdecrement (--) ck_lfun dIsT1 S
+postdec postdecrement (--) ck_lfun dIst1 S
i_postdec integer postdecrement (--) ck_lfun disT1 S
# Ordinary operators.
@@ -445,14 +461,14 @@ seq string eq ck_null ifs2 S S
sne string ne ck_null ifs2 S S
scmp string comparison (cmp) ck_scmp ifst2 S S
-bit_and bitwise and (&) ck_bitop fsT2 S S
-bit_xor bitwise xor (^) ck_bitop fsT2 S S
-bit_or bitwise or (|) ck_bitop fsT2 S S
+bit_and bitwise and (&) ck_bitop fst2 S S
+bit_xor bitwise xor (^) ck_bitop fst2 S S
+bit_or bitwise or (|) ck_bitop fst2 S S
-negate negation (-) ck_null IfsT1 S
+negate negation (-) ck_null Ifst1 S
i_negate integer negation (-) ck_null ifsT1 S
not not ck_null ifs1 S
-complement 1's complement (~) ck_bitop fsT1 S
+complement 1's complement (~) ck_bitop fst1 S
# High falutin' math.