diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2005-02-10 20:50:31 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2005-02-10 20:50:31 +0000 |
commit | a758b0b5fd9985d853637e2aa988519329533771 (patch) | |
tree | 13ac72625becca6611085c6ca03fe28f7bd0cfff /perly.y | |
parent | 2080282f2af44db6021d1dce04e81f0141289f86 (diff) | |
download | perl-a758b0b5fd9985d853637e2aa988519329533771.tar.gz |
[perl #34101] not() || 1 produces segmentation fault
Fixed by making not() behave like not(0). This is also the
way not() behaved before it started segfaulting in 5.6.0.
p4raw-id: //depot/perl@23960
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -672,7 +672,8 @@ term : termbinop { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); } | FUNC1 '(' ')' /* not () */ - { $$ = newOP($1, OPf_SPECIAL); } + { $$ = $1 == OP_NOT ? newUNOP($1, 0, newSVOP(OP_CONST, 0, newSViv(0))) + : newOP($1, OPf_SPECIAL); } | FUNC1 '(' expr ')' /* not($foo) */ { $$ = newUNOP($1, 0, $3); } | PMFUNC '(' argexpr ')' /* m//, s///, tr/// */ |