In perl.git, the branch smoke-me/ftrapv has been created
<http://perl5.git.perl.org/perl.git/commitdiff/65c512c3519b68852f64f5e1293cebadee892115?hp=0000000000000000000000000000000000000000>
at 65c512c3519b68852f64f5e1293cebadee892115 (commit)
- Log -----------------------------------------------------------------
commit 65c512c3519b68852f64f5e1293cebadee892115
Author: Nicholas Clark <[email protected]>
Date: Wed Mar 28 16:57:13 2012 +0200
Correct INSTALL to warn about editing cflags, not cflags.SH
Commit 668cbedd4fc8e9b2 in Nov 2011, as part of a much larger set of edits
and corrections, inadvertently changed 'cflags' to 'cflags.SH', which is
not correct in context.
M INSTALL
commit 78e230aef16bcd45dba3b038bb0883d528a495bd
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 16 20:24:45 2012 -0700
[perl #112478] Avoid buffer overflow in upg_version
On most systems, this is actually a panic, rather than an overflow,
because the overflow is detected before it can happen.
upg_version needs to use the equivalent of sprintf "%.9f" on a numeric
input before parsing it. For speedâs sake, I assume, it was done
using my_snprintf, with a C auto for the buffer, declared with a fixed
size of 64.
There is no guarantee that the number passed in will not overflow that
buffer, so upg_version should use an SV and sv_catpvf in those cases
where it would overflow.
M lib/version/t/coretests.pm
M util.c
commit 04bd644859054f7d9eeb94b6c7a3e2b76872a6ab
Author: Slaven Rezic <[email protected]>
Date: Wed Mar 21 20:59:46 2012 +0100
INSTALL doc changes because of TestInit.pm movement
commit 30b6e59101b252c20a6b50b95203d1e2c6016604 moved TestInit.pm from
t to top level.
M INSTALL
commit bac5c4fca5109adea821c05bef9182e2dac95c81
Author: Jan Dubois <[email protected]>
Date: Tue Apr 3 17:15:59 2012 -0700
SITELIB_EXP may be NULL on Windows
The sitelib directory is located dynamically at runtime by checking
for the ../site path relative to the location of perl5xx.dll. This
directory doesn't exist at buildtime, so calling strlen(NULL) may
cause an access violation...
M perl.c
commit 3607ca02d65ff63a9322effaf09e60361984e109
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 15 22:01:26 2012 -0700
[perl #112444] Donât leak %^H autovivified by destructor
More precisely, donât let a hint hash autovivified by a destructor
during scope exit leak to outer scopes.
GvHV(PL_hintgv) (aka *^H{HASH}) must be set to null before the hash in
it is freed on scope exit. Otherwise destructors will see %^H with a
refcount of zero, and might try to iterate over a hash that is in the
process of being freed. Bad things then happen. Commit 2653c1e3b1
took care of this.
Now, if GvHV(PL_hintgv) is null when destructors are called, those
destructors might end up autovivifying it. The code in scope.c that
handles hints when a scope is left (SAVEt_HINTS in Perl_leave_scope)
would then end up leaving that new autovivified %^H in place when the
scope exited, if the outer scope did not have HINT_LOCALIZE_HH set
(meaning %^H was unused).
That in itself would not be so much of a problem, if it were not for
the fact that %^H is magicalised by the scope-handling code, not when
it is autovivified (see also bug #112458). Hence, subsequent changes
to %^H would not magically set the HINT_LOCALIZE_HH hint bit, which
bit is checked all over the place to see whether %^H is in use. This,
in turn, would cause hints subsequently added to %^H to leak to
outer scopes.
This commit fixes that by repeatedly freeing GvHV(PL_hintgv). If a
destructor autovivifies it again, it just causes another iteration of
the while loop. This does mean a destructor could autovivify %^H and
cause the new %^H itself to trigger a destructor, resulting in infi-
nite loops. But then that is that own codeâs fault.
This originally came up because commit 2653c1e3b1 also caused des-
tructors that try to add new free magic to %^H to add it to a new
autovivified %^H instead of the existing %^H that was being freed.
This caused the nextgen module to fail its tests, because it uses
B::Hooks::EndOfScope to register a sub to be called on scope exit, and
it does this from a destructor itself called during scope exit. If
the autovivified %^H leaks to an outer scope, the second destructor is
not called.
M scope.c
M t/comp/hints.t
-----------------------------------------------------------------------
--
Perl5 Master Repository