| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
See <craigberry-E9C729.16313730092012@cpc2-bmly6-0-0-cust974.2-3.cable.virginmedia.com>.
Move the YYDEBUG defines in perly.c back where they were before, but
undefine YYDEBUG first. That leaves bison 2.6’s YYDEBUG defines in
perly.h harmless.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This particular syntax error, whittled down from ‘no if $] >= 5.17.4
warnings => "deprecated"’ (which contains a type), causes the parser
to try to free an op from the new sub (for the BEGIN block) after
freeing the new sub.
This happens on line 526 of perly.c. It should not be necessary for
the parser to free the op at this point, since after an error any ops
owned by incomplete subs’ slabs will be freed.
I’m leaving the other three instances of op_free in perly.c in place,
at least for now, since there are cases where the forced token stack
prevents ops from being freed when their subs are.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes most register declarations in C code (and accompanying
documentation) in the Perl core. Retained are those in the ext
directory, Configure, and those that are associated with assembly
language.
See:
http://stackoverflow.com/questions/314994/whats-a-good-example-of-register-variable-usage-in-c
which says, in part:
There is no good example of register usage when using modern compilers
(read: last 10+ years) because it almost never does any good and can do
some bad. When you use register, you are telling the compiler "I know
how to optimize my code better than you do" which is almost never the
case. One of three things can happen when you use register:
The compiler ignores it, this is most likely. In this case the only
harm is that you cannot take the address of the variable in the
code.
The compiler honors your request and as a result the code runs slower.
The compiler honors your request and the code runs faster, this is the least likely scenario.
Even if one compiler produces better code when you use register, there
is no reason to believe another will do the same. If you have some
critical code that the compiler is not optimizing well enough your best
bet is probably to use assembler for that part anyway but of course do
the appropriate profiling to verify the generated code is really a
problem first.
|
|
|
|
|
|
|
| |
This was an early attempt to fix leaking of ops after syntax errors,
disabled because it was deemed to fragile. The new slab allocator
(8be227a) has solved this problem another way, so latefree(d) no
longer serves any purpose.
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
|
|
|
|
| |
This meant changing LABEL's definition in perly.y, so most of this
commit is actually from the regened files.
|
|
|
|
|
|
|
| |
Sync copyright dates with actual changes according to git history.
[Plus run regen_perly.h to update the SHA-256 checksums, and
regen/regcharclass.pl to update regcharclass.h]
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by (Peter J. Acklam)
# Please include the string: [perl #81904]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81904 >
Signed-off-by: Abigail <abigail@abigail.be>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
yyparse() becomes reentrant. The yacc stack and related resources
are allocated in yyparse(), rather than in lex_start(), and they are
localised to yyparse(), preserving their values from any outer parser.
yyparse() now takes a parameter which determines which production it
will parse at the top level. New API function parse_fullstmt() uses this
facility to parse just a single statement. The top-level single-statement
production that is used for this then messes with the parser's head so
that the parsing stops without seeing EOF, and any lookahead token seen
after the statement is pushed back to the lexer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When discarding a token free the op associated with it.
Fixes memory leak in comp/parser.t
Gerard Goossen
From 7694ec023ec8856f34964b5eeea58f1b588c89bc Mon Sep 17 00:00:00 2001
From: Gerard Goossen <gerard@ggoossen.net>
Date: Fri, 18 Dec 2009 18:32:11 +0100
Subject: [PATCH 4/4] When discarding a token free the op associated with it.
Status: O
Content-Length: 438
Lines: 20
Fixes memory leak in comp/parser.t
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
| |
|
|
|
|
| |
it reference counted. Properly solves [perl #66094]
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
|
|
| |
http://www.nntp.perl.org/group/perl.daily-build.reports/2008/02/msg53937.html
p4raw-id: //depot/perl@33370
|
|
|
|
|
|
|
|
|
| |
Change 22306# inadvertently made 'local $[' statement-scoped
rather than block-scoped; so revert that change and add a
different fix. The problem was to ensure that the savestack got
popped correctly while popping errored tokens. We how record the
current value of PL_savestack_ix with each pushed parser state.
p4raw-id: //depot/perl@31615
|
|
|
|
|
|
| |
i.e. at the point where lexer vars are being restored in a LEAVE,
rather than at the end of yyparse()
p4raw-id: //depot/perl@30822
|
|
|
| |
p4raw-id: //depot/perl@29866
|
|
|
| |
p4raw-id: //depot/perl@29706
|
|
|
| |
p4raw-id: //depot/perl@29692
|
|
|
|
|
| |
also remove two SAVEs left over from #29655
p4raw-id: //depot/perl@29680
|
|
|
| |
p4raw-id: //depot/perl@29678
|
|
|
|
|
| |
earlier we missed in av.h and hv.h)
p4raw-id: //depot/perl@29670
|
|
|
| |
p4raw-id: //depot/perl@29667
|
|
|
|
|
| |
(where "easy" == "only appear in toke.c")
p4raw-id: //depot/perl@29655
|
|
|
| |
p4raw-id: //depot/perl@29652
|
|
|
| |
p4raw-id: //depot/perl@29649
|
|
|
|
|
| |
Message-ID: <4597C078.4000503@iki.fi>
p4raw-id: //depot/perl@29645
|
|
|
| |
p4raw-id: //depot/perl@29636
|
|
|
| |
p4raw-id: //depot/perl@29589
|
|
|
| |
p4raw-id: //depot/perl@29570
|
|
|
| |
p4raw-id: //depot/perl@29569
|
|
|
| |
p4raw-id: //depot/perl@29568
|
|
|
| |
p4raw-id: //depot/perl@29567
|
|
|
| |
p4raw-id: //depot/perl@29560
|
|
|
|
|
| |
(rather than afterwards)
p4raw-id: //depot/perl@29549
|
|
|
|
|
|
|
| |
e.g. these no longer leak:
eval q[my $x; local $x] while 1;
eval q[$s = sub <> {}] while 1;
p4raw-id: //depot/perl@29543
|
|
|
| |
p4raw-id: //depot/perl@29508
|
|
|
|
|
|
|
|
|
|
|
|
| |
Repeat of change #28319 (backed out by change #28720), this time
freeing ops using the right pad. Also backs out the remempad
parser addition from change #29501; instead a new auxiliary
paser stack is added, which records the current value of
PL_comppad for every state.
p4raw-link: @29501 on //depot/perl: 2af555bf3f2b3ca8e114df3f5f680d40bd24d6bf
p4raw-link: @28720 on //depot/perl: c86b7e916b443ee192c5638ad9d077ad4e244713
p4raw-link: @28319 on //depot/perl: eb7d7d25d2f780edcbedc124a5bdca0d53ad8687
p4raw-id: //depot/perl@29504
|
|
|
|
|
|
| |
Add hook to parser to record current PL_comppad, then use this
when popping ops off the parser stack after parser error
p4raw-id: //depot/perl@29501
|
|
|
|
|
|
| |
and rename to yy_type_tab[]. Then use this table to improve stack
dumping with -Dpv
p4raw-id: //depot/perl@29500
|
|
|
| |
p4raw-id: //depot/perl@29455
|
|
|
| |
p4raw-id: //depot/perl@29443
|
|
|
|
|
| |
madly.c is now just a wrapper that #includes perly.c
p4raw-id: //depot/perl@29440
|
|
|
| |
p4raw-id: //depot/perl@29438
|
|
|
|
|
| |
on eval("syntax error") statements
p4raw-id: //depot/perl@28720
|
|
|
|
|
|
|
| |
death while exdcuting code while parsing meant that the current
parse stack got quiety abandonded, thus leaking a bunch of OPs.
Register a destructor to be called when this happens.
p4raw-id: //depot/perl@28319
|
|
|
| |
p4raw-id: //depot/perl@28316
|
|
|
|
|
|
|
|
| |
When bison pops states during error recovery, any states holding
an OP would leak the OP. Create an extra YY table that tells us
which states are of type opval, and when popping one of those,
free the op.
p4raw-id: //depot/perl@28315
|
|
|
|
|
| |
find the bugs that stowed away.
p4raw-id: //depot/perl@27447
|