Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 45f9600

Browse files
committed
Storable-3.12_02, Makefile integration
Enable >2GB AvFILL check on store_hook (64bit). Too many references returned by STORABLE_freeze. It wrapped around previously. Fixes Coverity CID #187854. This is a security issue on 64bit cperl and perl5, as both allow SSize_t arrays. Move __Storable__.pm into Storable_pm.PL [cperl #374] Merge Makefile recipes from blead.
1 parent 0c98b8c commit 45f9600

28 files changed

+1919
-380
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ lib/unicore/lib/
135135
lib/unicore/mktables.lst
136136
lib/B/Stash.pm
137137
lib/ByteLoader.pm
138+
lib/Storable/
138139

139140
# generated by WinCE build
140141
xlib/

MANIFEST

+3-2
Original file line numberDiff line numberDiff line change
@@ -3639,9 +3639,8 @@ dist/Storable/hints/linux.pl Hint for Storable for named architecture
36393639
dist/Storable/Makefile.PL Storable extension
36403640
dist/Storable/README Storable extension
36413641
dist/Storable/stacksize compute stack sizes
3642-
dist/Storable/stacksize_in.h computed stack sizes
3643-
dist/Storable/Storable.pm Storable extension
36443642
dist/Storable/Storable.xs Storable extension
3643+
dist/Storable/Storable_pm.PL Storable extension
36453644
dist/Storable/t/attach.t Check STORABLE_attach doesn't create objects unnecessarily
36463645
dist/Storable/t/attach_errors.t Trigger and test STORABLE_attach errors
36473646
dist/Storable/t/attach_singleton.t Test STORABLE_attach for the Singleton pattern
@@ -3665,6 +3664,7 @@ dist/Storable/t/HAS_ATTACH.pm For auto-requiring of modules for STORABLE_attach
36653664
dist/Storable/t/HAS_HOOK.pm For auto-requiring of modules for STORABLE_thaw
36663665
dist/Storable/t/HAS_OVERLOAD.pm For auto-requiring of mdoules for overload
36673666
dist/Storable/t/huge.t See how Storable handles huge data
3667+
dist/Storable/t/hugeids.t
36683668
dist/Storable/t/integer.t See if Storable works
36693669
dist/Storable/t/interwork56.t Test compatibility kludge for 64bit data under 5.6.x
36703670
dist/Storable/t/just_plain_nasty.t See if Storable works
@@ -3676,6 +3676,7 @@ dist/Storable/t/make_overload.pl Make test data for overload.t
36763676
dist/Storable/t/malice.t See if Storable copes with corrupt files
36773677
dist/Storable/t/overload.t See if Storable works
36783678
dist/Storable/t/recurse.t See if Storable works
3679+
dist/Storable/t/regexp.t
36793680
dist/Storable/t/restrict.t See if Storable works
36803681
dist/Storable/t/retrieve.t See if Storable works
36813682
dist/Storable/t/robust.t See if it survives mangled %INC

Makefile.SH

+53-22
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,15 @@ esac
177177
: is Cwd static or dynamic
178178
static_cwd='define'
179179
cwd_dep='$(PERL_EXE)'
180+
storable_limit_dep=''
181+
storable_type=''
180182
list_util_dep='$(PERL_EXE)'
181183
for f in $dynamic_ext; do
182184
case $f in
183185
Cwd) static_cwd='undef'; cwd_dep=lib/auto/Cwd/Cwd.$dlext ;;
184-
List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext
186+
List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext ;;
187+
Storable) storable_limit_dep=lib/auto/Storable/Storable.$dlext
188+
storable_type='dynamic' ;;
185189
esac
186190
done
187191

@@ -222,6 +226,7 @@ $this_target: lib/auto/re/re\$(LIB_EXT)" ;;
222226
$this_target: lib/auto/List/Util/Util\$(LIB_EXT)" ;;
223227
Unicode/Normalize) extra_dep="$extra_dep
224228
$this_target: uni.data" ;;
229+
Storable) storable_type='static' ;;
225230
esac
226231
done
227232

@@ -640,7 +645,7 @@ lintflags = \
640645
.c.s: perl.h config.h
641646
`$(CCCMDSRC)` -S $*.c
642647
643-
all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
648+
all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT) common_build
644649
@echo " ";
645650
@echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
646651
@@ -1179,7 +1184,7 @@ esac
11791184

11801185
$spitshell >>$Makefile <<'!NO!SUBS!'
11811186
1182-
.PHONY: preplibrary rebuild_storable
1187+
.PHONY: preplibrary common_build
11831188
preplibrary: $(MINIPERL_EXE) $(CONFIGPM) $(PREPLIBRARY_LIBPERL)
11841189
11851190
$(CONFIGPM_FROM_CONFIG_SH): $(CONFIGPOD)
@@ -1197,16 +1202,6 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
11971202
# can in this makefile to decide if needs to run or not
11981203
# touch uni.data
11991204
1200-
!NO!SUBS!
1201-
$spitshell >>$Makefile <<!GROK!THIS!
1202-
1203-
rebuild_storable: \$(PERL_EXE) $cwd_dep
1204-
-\$(RUN_PERL) dist/Storable/stacksize --core
1205-
\$(MAKE) -C dist/Storable PERL_CORE=1
1206-
1207-
!GROK!THIS!
1208-
$spitshell >>$Makefile <<'!NO!SUBS!'
1209-
12101205
# $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
12111206
# But also this ensures that all extensions are built before we try to scan
12121207
# them, which picks up Devel::PPPort's documentation.
@@ -1238,7 +1233,7 @@ extra.pods: $(MINIPERL_EXE)
12381233
echo "pod/perl"$$nx".pod" >> extra.pods ; \
12391234
done
12401235
1241-
extras.make: $(PERL_EXE) rebuild_storable
1236+
extras.make: $(PERL_EXE)
12421237
-@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
12431238
12441239
extras.test: $(PERL_EXE)
@@ -1258,6 +1253,25 @@ no_install no-install: install-notify
12581253
install: install-all
12591254
!NO!SUBS!
12601255

1256+
if test "$storable_type" != "" ; then
1257+
1258+
case "$static_cwd" in
1259+
undef) storable_limit_dep="$storable_limit_dep lib/auto/Cwd/Cwd.$dlext" ;;
1260+
esac
1261+
1262+
$spitshell >>$Makefile <<EOT
1263+
1264+
dist/Storable/lib/Storable/Limit.pm : \$(PERL_EXE) dist/Storable/stacksize $storable_limit_dep
1265+
cd dist/Storable ; \$(LDLIBPTH) \$(MAKE) lib/Storable/Limit.pm
1266+
1267+
lib/Storable/Limit.pm : dist/Storable/lib/Storable/Limit.pm
1268+
test -d lib/Storable || mkdir lib/Storable
1269+
cp dist/Storable/lib/Storable/Limit.pm lib/Storable/Limit.pm
1270+
EOT
1271+
1272+
common_build_deps="$common_build_deps lib/Storable/Limit.pm"
1273+
1274+
fi
12611275

12621276
for name in all notify silent strip verbose; do
12631277
flags="--$name";
@@ -1640,14 +1654,14 @@ test_prep_pre: preplibrary utilities $(nonxs_ext)
16401654
case "$targethost" in
16411655
'') $spitshell >>$Makefile <<'!NO!SUBS!'
16421656
test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
1643-
$(dynamic_ext) extras.make $(TEST_PERL_DLL) runtests $(generated_pods)
1657+
$(dynamic_ext) extras.make $(TEST_PERL_DLL) runtests $(generated_pods) common_build
16441658
cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
16451659
!NO!SUBS!
16461660
;;
16471661
*) $spitshell >>$Makefile <<!GROK!THIS!
16481662
test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE) \
16491663
\$(dynamic_ext) extras.make \$(TEST_PERL_DLL) runtests \
1650-
\$(generated_pods)
1664+
\$(generated_pods) common_build
16511665
$to libperl.*
16521666
$to t/*
16531667
$to lib/*
@@ -1763,9 +1777,9 @@ esac
17631777
$spitshell >>$Makefile <<'!NO!SUBS!'
17641778
17651779
# minitest can't depend on lib/Config.pm because that might be where miniperl
1766-
# is crashing.
1780+
# is crashing. ditto for mktables
17671781
minitest_prep:
1768-
-@test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles)
1782+
-@test -f lib/Config.pm -a -f lib/unicore/Name.pm || $(MAKE) lib/Config.pm $(unidatafiles)
17691783
@echo " "
17701784
@echo "You may see some irrelevant test failures if you have been unable"
17711785
@echo "to build lib/Config.pm, or the Unicode data files."
@@ -1797,6 +1811,17 @@ test_reonly test-reonly: test_prep_reonly
17971811
test_porting test-porting: test_prep
17981812
cd t && $(RUN_PERL) harness porting/*.t ../lib/diagnostics.t
17991813
1814+
!NO!SUBS!
1815+
1816+
$spitshell>>$Makefile <<!GROK!THIS!
1817+
1818+
# intended as a common way to add dependencies to test-prep and all
1819+
common_build: $common_build_deps
1820+
1821+
!GROK!THIS!
1822+
1823+
$spitshell >>$Makefile <<'!NO!SUBS!'
1824+
18001825
# Handy way to run cperlbug -ok without having to install and run the
18011826
# installed cperlbug. We don't re-run the tests here - we trust the user.
18021827
# Please *don't* use this unless all tests pass.
@@ -1842,11 +1867,17 @@ distcheck: FORCE
18421867
18431868
.PHONY: ctags
18441869
1845-
TAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
1846-
etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
1870+
TAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h) $(inc)
1871+
etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h) $(inc) mg_*.h
1872+
1873+
FULLTAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h) $(inc)
1874+
etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h) $(inc) mg_*.h \
1875+
`find cpan dist ext -type f -name \*.[ch]`
18471876
1848-
FULLTAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
1849-
etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h) `find cpan dist ext -type f -name \*.[ch]`
1877+
GTAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h) $(inc)
1878+
echo $(c1) $(c2) $(c3) $(c4) $(c5) $(h) $(inc) mg_*.h | \
1879+
tr ' ' $(TRNL) > gtags.files
1880+
gtags -v --file gtags.files
18501881
18511882
ctags:
18521883
ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h

Porting/Maintainers.pl

+4-1
Original file line numberDiff line numberDiff line change
@@ -1283,8 +1283,11 @@ package Maintainers;
12831283
},
12841284

12851285
'Storable' => {
1286-
'DISTRIBUTION' => 'RURBAN/Storable-3.05_14.tar.gz',
1286+
'DISTRIBUTION' => 'RURBAN/Storable-3.12_02.tar.gz',
12871287
'FILES' => q[dist/Storable],
1288+
'EXCLUDED' => [
1289+
qw( ptr_table.h t/leaks_refcnt.t .travis.yml appveyor.yml ),
1290+
]
12881291
},
12891292

12901293
'Sys::Syslog' => {

dist/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Makefile
77
Makefile.PL
88
ppport.h
99
Storable/storable-testfile.*
10-
Storable/stacksize.h
10+
Storable/Storable.pm
11+
Storable/lib/Storable/Limit.pm
1112
Time-HiRes/*.inc
1213
Time-HiRes/xdefine

dist/Module-CoreList/lib/Module/CoreList.pm

+1
Original file line numberDiff line numberDiff line change
@@ -17779,6 +17779,7 @@ our %delta :const = (
1777917779
'Scalar::Util' => '1.50_11',
1778017780
'Sub::Util' => '1.50_11',
1778117781
'Socket' => '2.027_04',
17782+
'Storable' => '3.12_02',
1778217783
},
1778317784
removed => {
1778417785
}

dist/Storable/ChangeLog

+81
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,84 @@
1+
2018-04-27 20:40:00 xsawyerx
2+
version 3.11
3+
* Fix Strawberry Perl build failures.
4+
5+
2018-04-21 22:00:00 xsawyerx
6+
Version 3.10
7+
* Fix binary artifacts from distribution.
8+
9+
2018-04-21 16:49:00 xsawyerx
10+
Version 3.09
11+
* Fix "provides" in metadata (META.yml/META.json) to use the Storable
12+
template instead of a small other file (which also didn't exist).
13+
14+
2018-04-21 11:23:00 xsawyerx
15+
Version 3.08
16+
* (perl #132849) try to disable core files when deliberatly segfaulting.
17+
* (perl #127743) don't probe Storable limits so much.
18+
* (perl #132893) don't probe for Storable recursion limits on old Win32.
19+
* (perl #132870) workaround VC2017 compiler bug.
20+
* (perl #127743) re-work for debugging builds with MSVC.
21+
* (perl #133039) dont build a Storable.so/.dll with a static perl build.
22+
23+
2018-02-07 15:08:00 tonyc
24+
Version 3.06
25+
26+
* support large object ids. The code in theory supported arrays
27+
with more than 2**32 elements, but references to the elements
28+
emitted at the end of the array with be retrieved as references to
29+
the wrong elements.
30+
* 32-bit object ids over 2**31-1 weren't correctly handled.
31+
* hook object id generation now supports 64-bit ids where needed
32+
* writing 64-bit lengths in network order now works
33+
* reading 64-bit lengths in network order now reads the components
34+
in the correct order.
35+
* retrieving large object tags are now only handled on 64-bit
36+
platforms, large object tags should only be emitted for objects
37+
that are too large for the 32-bit address space, so it was only
38+
wasted code.
39+
* reading 32-bit lengths for LSCALAR and LUTF8STR as unsigned
40+
(perl #131990)
41+
* reading flagged large object hashes didn't read the flags
42+
* treat the 32-bit size of hook data as unsigned, values over 2GB
43+
were treated as large (close to 2**64) parameters to NEWSV().
44+
(perl #131999)
45+
* added support for hook data over 4GB in size
46+
* zero length data receievd from STORABLE_freeze() no longer
47+
results in an invalid SV being passed to STORABLE_thaw/_attach()
48+
(perl #118551)
49+
* where practical, padding is now cleared when emitting a long
50+
double (perl #131136)
51+
* cache the value of $Storable::DEBUGME (since cperl enabled
52+
Storable TRACEME builds for all -DDEBUGGING builds)
53+
* no longer discard exceptions thrown by
54+
STORABLE_freeze/_thaw/attach() (perl #25933)
55+
* fix dependencies used to build Storable.pm from __Storable__.pm
56+
* add experimental support for freezing/thawing regular
57+
expressions (perl #50608)
58+
* re-work recursion limiting to store the limit in a perl variable
59+
instead of baked into Storable.$so. This allows static Storable
60+
builds to work, and avoids the kind of circular reference on
61+
Storable.$so.
62+
63+
2017-11-10 13:53:00 rurban
64+
Version 3.05_17
65+
66+
* t/blessed.t: Better fix for pre-5.19.2 threaded perls
67+
from p5p.
68+
69+
2017-10-21 17:55:53 rurban
70+
Version 3.05_16
71+
72+
* stacksize: larger stack reserve. Unified to 32 across all platforms.
73+
74+
2017-10-21 10:08:53 rurban
75+
Version 3.05_15
76+
77+
* t/blessed.t: TODO 5.10/5.12 threaded ref sv_true identity,
78+
ref sv_true is not sv_true with those old perls.
79+
* stacksize: low values only for Windows with unreliable SEGV signals,
80+
back to higher depths with all others.
81+
182
2017-10-15 13:57:00 rurban
283
Version 3.05_14
384

0 commit comments

Comments
 (0)