| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently perl does 3 major scans of the SV arenas, so the action of
perl_destroy() is a bit like this:
for (all arena SVs) {
if (its a ref to an object)
undef the ref (and thus probably free the object)
}
for (all arena SVs) {
if (it's a typeglob and at least one of its slots holds an object) {
set SVf_BREAK on the gv
SvREFCNT_dec(gv)
}
}
return if $PERL_DESTRUCT_LEVEL < 1;
PL_in_clean_all = 1
for (all arena SVs) {
set SVf_BREAK on the sv
SvREFCNT_dec(sv)
}
The second scan is problematic, in that by randomly zapping GVs, it can
leave dangling pointers to freed GVs. This is while perl-level destructors
may still be called, meaning perl users can see corrupted state.
Note also that at this point PL_in_clean_all hasn't been set, so sv_free()
may put out 'Attempt to free unreferenced scalar' warnings.
This commit fixes this by only freeing the affected slots of the GV,
rather than freeing the GV itself. Thus makes it more like the first pass,
which undefs RVs, and ensures no dangling refs.
|
|
|
|
|
| |
Signed-off-by: Florian Ragwitz <rafl@debian.org>
[rafl@debian.org: Changed tabs to spaces in perlguts chunks for consistency]
|
|
|
|
|
|
|
| |
nice_chunk_size was U32, and had been paired with another 32 bit value to
ensure that all 64 bit quantities were naturally 64 bit aligned. There already
was a 32 bit "hole" elsewhere - reorder the two unpaired 32 bit values next to
each other.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These provided a non-public API for the hash and array code to donate free
memory direct to the SV head allocation routines, instead of returning it
to the malloc system with free().
I assume that on some older mallocs this could offer significant benefits.
However, my benchmarking on a modern malloc couldn't detect any significant
effect (positive or negative) on removing the code. Its (continued) presence,
however, has downsides
a: slightly more code complexity
b: slightly larger interpreter structure
c: in the steady state, if net creation of SVs is zero, 1 chunk of allocated
but unused memory will exist (per thread)
So I think it best to remove it.
|
|
|
|
|
|
|
|
| |
New variable PL_rpeepp makes it possible for extensions to hook
the per-op-chain part of the peephole optimiser (which recurses into
side chains). The existing variable PL_peepp still allows hooking the
per-sub part of the peephole optimiser, maintaining perfect backward
compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds PL_apiversion, allowing the API version of a running interpreter to be
introspected. It is used in the new XS_APIVERSION_BOOTCHECK macro, which is
added to the _boot function of every XS module, to compare it against the API
version the module has been compiled against. If the versions do not match, an
exception is thrown.
This doesn't fully prevent binary incompatible extensions to be loaded. It
merely compares PERL_API_* between compile- and runtime, and does not attempt to
solve the problem of identifying binary incompatible perls with the same API
version (i.e. the same perl version configured with and without DEBUGGING).
|
|
|
|
|
|
|
|
|
|
| |
These take the form of a vtable pushed onto the new PL_blockhooks array.
This could probably do with a API around it later. Separate pre_end and
post_end hooks are needed to capture globals before the stack is unwound
(like needblockscope in the existing code). The intention is that once
a vtable is installed it never gets removed, so where necessary
extensions using this will need to use a hinthv element to determine
whether to do anything or not.
|
| |
|
|
|
|
|
| |
This is initially intended for threads::shared and shouldn't (yet)
be considered part of the public API.
|
| |
|
|
|
|
|
|
|
|
| |
When unwinding due to die, the new global PL_restartjmpenv points
to the JMP_ENV at which longjmping should stop and control should
be transferred to PL_restartop. This replaces the previous
use of cxstack[cxstack_ix+1].blk_eval.cur_top_env, located in a
nominally-discarded context frame.
|
| |
|
|
|
|
|
|
| |
-DDEBUGGING and not need to be binary compatible with each other. Fixes the
test failures in ext/re caused by d343c3ef45381352 for threaded builds without
-DDEBUGGING.
|
|
|
|
| |
ENTER/LEAVE when debugging is enabled
|
| |
|
| |
|
| |
|
|
|
|
| |
for OP hooks
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(The table is 256 bytes; the run-time initialisation code is larger than this!)
Adapt generate_uudmap.c to generate the initalisation block for PL_bitcount,
writing the code to bitcount.h, using the same approach as uudmap.h.
To preserve binary compatibility:
for MULTIPLICITY:
keep Ibitcount in the interpreter structure, but remove all the macros that
access it. PL_bitcount is a new symbol in the object file, which won't clash
with anything as that name wasn't used before.
otherwise:
keep PL_bitcount as a char *, but initialise it at compile time to a new
constant array PL_bitcount array. Remove the code that attempts to Safefree()
it at interpreter destruction time.
|
| |
|
|
|
|
|
|
| |
Perl_mro_get_from_name() to retrieve MROs by name, and PL_registered_mros to
store them in. Abolish the static array of mros, and instead register the dfs
and c3 MRO structures.
|
|
|
|
|
|
| |
I32. This permits some space saving rejigging of the interpreter
struct.
p4raw-id: //depot/perl@34930
|
|
|
| |
p4raw-id: //depot/perl@34887
|
|
|
|
|
| |
the ANSI gods of VMS.
p4raw-id: //depot/perl@34886
|
|
|
|
|
| |
lines in subroutines defined inside eval ""s for the debugger.
p4raw-id: //depot/perl@34873
|
|
|
|
|
| |
Message-ID: <20081114084436.GJ5779@tytlal.topaz.cx>
p4raw-id: //depot/perl@34831
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
|
|
| |
Message-ID: <20081022013731.23b5a2e5@r2d2>
p4raw-id: //depot/perl@34568
|
|
|
|
|
|
| |
PL_in_eval do not need to be volatile. This improves the generated code
measurably - for example toke.o is 1.5% smaller. Every little helps.
p4raw-id: //depot/perl@33355
|
|
|
|
|
| |
use less memory than an AV.
p4raw-id: //depot/perl@32959
|
|
|
|
|
| |
now an illegal command line flag.
p4raw-id: //depot/perl@32956
|
|
|
| |
p4raw-id: //depot/perl@32954
|
|
|
| |
p4raw-id: //depot/perl@32944
|
|
|
|
|
|
| |
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D09399A@exchsvr2.npl.ad.local>
p4raw-id: //depot/perl@32681
|
|
|
|
|
|
|
| |
-1. Really this should be I8, but it turns out that Configure's choice
of type for I8 is buggy - it always uses char, which is unsigned on
some platforms.
p4raw-id: //depot/perl@32561
|
|
|
|
|
| |
a now unused variable.
p4raw-id: //depot/perl@32477
|
|
|
|
|
|
|
|
| |
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510711061136t52a1fe62waf384c4551612181@mail.gmail.com>
(core patch only)
p4raw-id: //depot/perl@32241
|
|
|
|
|
|
|
|
|
|
|
| |
into global variables (and hence a shared perl library). Additionally
under MULTIPLICITY record the size of the interpreter structure (total,
and for this version) and under PERL_GLOBAL_STRUCT the size of the
global variables structure. Coupled with PL_bincompat_options this will
allow 5.10.1 (and later), when compiled with a shared perl library, to
perform sanity checks in main() to verify that the shared library is
indeed binary compatible.
p4raw-id: //depot/perl@32238
|
|
|
|
|
| |
structure to the end.
p4raw-id: //depot/perl@32068
|
|
|
|
|
|
|
| |
(Spotted a U8 sized hole, and filled the known U16 sized hole).
Moved the sig_pending so that its int fills the 4 byte space left by
csh_len, to reduce padding on LP64.
p4raw-id: //depot/perl@32067
|
|
|
|
|
|
|
| |
PL_cshlen can be calculated by the compiler. So eliminate both as
interpreter variables, and the code that calculates PL_cshlen at
runtime.
p4raw-id: //depot/perl@32035
|
|
|
|
|
| |
p4raw-link: @31978 on //depot/perl: d804f4346b490171e547d5cc512063e53da10708
p4raw-id: //depot/perl@32015
|
|
|
|
|
|
| |
structure. Add a "spare" variable so that we can add the first post-
5.10.0 bool variable without growing the interpreter structure.
p4raw-id: //depot/perl@31987
|
|
|
|
|
|
| |
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <2C2E01334A940D4792B3E115F95B7226C9D1C3@exchsvr1.npl.ad.local>
p4raw-id: //depot/perl@31978
|
|
|
| |
p4raw-id: //depot/perl@31871
|
|
|
| |
p4raw-id: //depot/perl@31868
|
|
|
|
|
| |
p4raw-link: @31246 on //depot/perl: 95ca8690fb514421b98da534c91bfd455c9daabc
p4raw-id: //depot/perl@31842
|