mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 11:10:49 +00:00
Compare commits
1007
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8232d6f6bd | ||
|
|
e75d58b4e4 | ||
|
|
e85cae8ef4 | ||
|
|
d317e16e89 | ||
|
|
747cb46244 | ||
|
|
4f984a2fdb | ||
|
|
85874af404 | ||
|
|
e175a0a1c8 | ||
|
|
e29922f054 | ||
|
|
d3237b5504 | ||
|
|
5f6eaf355c | ||
|
|
33dd25d21c | ||
|
|
f9895b4bf5 | ||
|
|
8c2b3b0568 | ||
|
|
2bdb13a1f7 | ||
|
|
736cd93ef5 | ||
|
|
89c327f884 | ||
|
|
b61b60d15b | ||
|
|
16c4910876 | ||
|
|
469820048d | ||
|
|
74699533e5 | ||
|
|
5249993814 | ||
|
|
813305b67f | ||
|
|
8daf96cef3 | ||
|
|
832b5c7b9d | ||
|
|
fa89c41f37 | ||
|
|
52f049879a | ||
|
|
326cd05dae | ||
|
|
36943dfff1 | ||
|
|
c00fd843d7 | ||
|
|
2213bd36fd | ||
|
|
57b4dcbe77 | ||
|
|
4b5cdda0c7 | ||
|
|
1c9b62fbd4 | ||
|
|
bea2ff88c9 | ||
|
|
ab061f95ca | ||
|
|
4f50d58cab | ||
|
|
ce035dc4a0 | ||
|
|
45a7723267 | ||
|
|
c7c7ab53ac | ||
|
|
d2cde0bfd3 | ||
|
|
3725a446ba | ||
|
|
22ac57b064 | ||
|
|
e2a6bf482f | ||
|
|
7439d48bea | ||
|
|
900bdcbd03 | ||
|
|
74ac3dd6e2 | ||
|
|
46561dab6a | ||
|
|
4ba8d78100 | ||
|
|
96c84b7bc1 | ||
|
|
a0163417ef | ||
|
|
daf1fc6e31 | ||
|
|
bbd481c11d | ||
|
|
3164186d53 | ||
|
|
6fd6ad8f53 | ||
|
|
cbf589b17c | ||
|
|
d6ca174d5b | ||
|
|
736af5f660 | ||
|
|
a8f60ac9dd | ||
|
|
9fd555f99e | ||
|
|
46894580b0 | ||
|
|
2fdd142f99 | ||
|
|
d6fdc17f7f | ||
|
|
195c2008e8 | ||
|
|
26f45cb4bb | ||
|
|
4b15f7ca09 | ||
|
|
05d6878b3b | ||
|
|
11654fdfa6 | ||
|
|
fd3118ffb0 | ||
|
|
8a03fd6a5e | ||
|
|
19e6abebc7 | ||
|
|
2624c9a505 | ||
|
|
7d19668f60 | ||
|
|
ab61d5caf9 | ||
|
|
3322c78a88 | ||
|
|
114c03b9a6 | ||
|
|
239e2dda64 | ||
|
|
1d6e9da743 | ||
|
|
1ce8c805e2 | ||
|
|
545412a6cd | ||
|
|
cf183a5e2c | ||
|
|
abaf9a76dc | ||
|
|
f45eb353d1 | ||
|
|
a6d219630c | ||
|
|
f4d078b1c7 | ||
|
|
9a2b42a5c1 | ||
|
|
5b1bb23edf | ||
|
|
05560b67bc | ||
|
|
0505fbf2e5 | ||
|
|
d295e1dce2 | ||
|
|
f2fb37a772 | ||
|
|
752a34fb2c | ||
|
|
8ce04df7e0 | ||
|
|
3c42471ef8 | ||
|
|
a5d3620d93 | ||
|
|
f7596d1b5b | ||
|
|
3124129ca8 | ||
|
|
848bc776ea | ||
|
|
2fcb5eadbb | ||
|
|
2fc5d00afa | ||
|
|
209e37db7d | ||
|
|
0805e132b0 | ||
|
|
6fcde56b03 | ||
|
|
2046b3ce4f | ||
|
|
e546d721e8 | ||
|
|
45db6fa567 | ||
|
|
466f91bb3b | ||
|
|
f6bfbe9553 | ||
|
|
7df50ef147 | ||
|
|
66c48e8694 | ||
|
|
37d27e666a | ||
|
|
878704ff6f | ||
|
|
115f6effec | ||
|
|
91c4abcfcc | ||
|
|
ab938d7bbc | ||
|
|
99c67804d5 | ||
|
|
8a9df88597 | ||
|
|
915fe2fdc6 | ||
|
|
d2331cc3f2 | ||
|
|
7530938670 | ||
|
|
8f949eba80 | ||
|
|
8c9c58436b | ||
|
|
ed099ab186 | ||
|
|
954d073833 | ||
|
|
3ddb63dce1 | ||
|
|
d0f4966b05 | ||
|
|
bc4c4c658c | ||
|
|
087051c9a5 | ||
|
|
1a184f030a | ||
|
|
f53af9ac23 | ||
|
|
8509970e6a | ||
|
|
e65adc9c19 | ||
|
|
9c89f43d55 | ||
|
|
697945aa89 | ||
|
|
9cd365e571 | ||
|
|
f989a4cd44 | ||
|
|
623d897998 | ||
|
|
0701835c01 | ||
|
|
33e556fab4 | ||
|
|
0d6c2448a7 | ||
|
|
698088ca7c | ||
|
|
398b308316 | ||
|
|
e76dea4283 | ||
|
|
0fa13028cb | ||
|
|
85e7668129 | ||
|
|
003c13d7bc | ||
|
|
6bf5c8508a | ||
|
|
3e139a4653 | ||
|
|
f53b8268d6 | ||
|
|
e3255a4f49 | ||
|
|
85b001974a | ||
|
|
e11ed02870 | ||
|
|
03efeda538 | ||
|
|
409e9ea51d | ||
|
|
175f4f24ae | ||
|
|
c5d4c45e7d | ||
|
|
e691a98c1f | ||
|
|
3a2fa489dd | ||
|
|
252ebce0d7 | ||
|
|
f98684b06c | ||
|
|
29bced9521 | ||
|
|
8a11f1284e | ||
|
|
2f6efd835d | ||
|
|
74876f09c4 | ||
|
|
8873df8e86 | ||
|
|
da8aa4a798 | ||
|
|
81cefab7b0 | ||
|
|
00ad365125 | ||
|
|
fdcca93056 | ||
|
|
df982da587 | ||
|
|
31f617d9bc | ||
|
|
f6f981c13c | ||
|
|
716518373f | ||
|
|
6f0e5a45ff | ||
|
|
2823e938d4 | ||
|
|
e2bdd7b4ab | ||
|
|
a270eb1911 | ||
|
|
664b1a3f57 | ||
|
|
c43fc204b1 | ||
|
|
cf31210f29 | ||
|
|
318b92dc12 | ||
|
|
bca66002f1 | ||
|
|
3f2d5c612e | ||
|
|
1ac6b0251b | ||
|
|
73ede6911d | ||
|
|
af2033b1cd | ||
|
|
8ead77936e | ||
|
|
60cfa5781a | ||
|
|
b90cd91eba | ||
|
|
41a4379cb4 | ||
|
|
d66e0f165d | ||
|
|
9c3b7ccda5 | ||
|
|
f712925500 | ||
|
|
86ddc469f9 | ||
|
|
cd63908ab8 | ||
|
|
7659182632 | ||
|
|
5a0980f1d9 | ||
|
|
e9cfd94b8e | ||
|
|
8f564e5308 | ||
|
|
34edd4aa2a | ||
|
|
ed749edd47 | ||
|
|
195b8ae779 | ||
|
|
b557265816 | ||
|
|
fadd7f0f1e | ||
|
|
481520d381 | ||
|
|
5748cec3ee | ||
|
|
e2b60796f0 | ||
|
|
88ab374627 | ||
|
|
ffcf57fa18 | ||
|
|
461db52400 | ||
|
|
589542f50c | ||
|
|
e4ecadcb62 | ||
|
|
1e82a2d659 | ||
|
|
f5bccc0eb5 | ||
|
|
a26f63213d | ||
|
|
16d35eb643 | ||
|
|
d1646e328a | ||
|
|
5d25ebb0dd | ||
|
|
4b4a656d9e | ||
|
|
7bf1f9d561 | ||
|
|
d3f2cfe20a | ||
|
|
5704eca6f7 | ||
|
|
087cb7bab2 | ||
|
|
1258303e66 | ||
|
|
03c7749dc8 | ||
|
|
c9d31941e4 | ||
|
|
ff7029b65b | ||
|
|
310708845f | ||
|
|
08aafbe93e | ||
|
|
963b40c9a8 | ||
|
|
3771d66142 | ||
|
|
cdf16c010a | ||
|
|
5e19f1d458 | ||
|
|
81f52158b4 | ||
|
|
be7e819068 | ||
|
|
a192499d2a | ||
|
|
725f439778 | ||
|
|
9b9814fa77 | ||
|
|
4966647443 | ||
|
|
8fb297cd82 | ||
|
|
1166359acb | ||
|
|
fcabe7e5e4 | ||
|
|
e5da73d1f2 | ||
|
|
4b64d47c99 | ||
|
|
5536105b67 | ||
|
|
fe7997912d | ||
|
|
a33361a37c | ||
|
|
4eeb41d1ea | ||
|
|
7ba54b9822 | ||
|
|
18f2918a0f | ||
|
|
4cd563d07e | ||
|
|
f3fdf570b3 | ||
|
|
7aa1dd3ba1 | ||
|
|
722a44d515 | ||
|
|
9b43e29d9b | ||
|
|
22d23e08c9 | ||
|
|
6b1cc1252e | ||
|
|
21a0a28fd0 | ||
|
|
2e2cd65d73 | ||
|
|
5ef1a30aaf | ||
|
|
796efd849e | ||
|
|
38f10ff5cf | ||
|
|
bff2743caf | ||
|
|
358379be22 | ||
|
|
9ea39d15ab | ||
|
|
954543cec6 | ||
|
|
a87ef5e3dd | ||
|
|
81efd489db | ||
|
|
f9f4a68368 | ||
|
|
d89157cd67 | ||
|
|
e1934f8515 | ||
|
|
85e8ccd55e | ||
|
|
b419b24ead | ||
|
|
8af14024c2 | ||
|
|
1c01a1579e | ||
|
|
ef439abd46 | ||
|
|
6ea13baaf1 | ||
|
|
b29ecec4ef | ||
|
|
8947fd9e9f | ||
|
|
d69894734d | ||
|
|
284fb08fdc | ||
|
|
cd1101e8c8 | ||
|
|
42e8b85d94 | ||
|
|
44fe025c28 | ||
|
|
dc7aa22b18 | ||
|
|
bbed5564eb | ||
|
|
38f1288b64 | ||
|
|
76683ea999 | ||
|
|
8e63bb5e46 | ||
|
|
552ce9c763 | ||
|
|
68fd435ba8 | ||
|
|
727929765b | ||
|
|
d142dfc93d | ||
|
|
aeb6d13185 | ||
|
|
dea2989ab8 | ||
|
|
585131f901 | ||
|
|
30eb4b3563 | ||
|
|
c624a7fe43 | ||
|
|
5649267b25 | ||
|
|
b42a13b08a | ||
|
|
9e2ac14702 | ||
|
|
8f384bea93 | ||
|
|
b59a9381b9 | ||
|
|
5e4dbce586 | ||
|
|
bdf24f8d6d | ||
|
|
82f35ab089 | ||
|
|
eb7e45f662 | ||
|
|
4a9f78f9d7 | ||
|
|
c8c183eb62 | ||
|
|
79efd55fc3 | ||
|
|
b864abfe23 | ||
|
|
e7e66d5275 | ||
|
|
956ecc2ce5 | ||
|
|
344d01bee3 | ||
|
|
bd0514913b | ||
|
|
eea9d61763 | ||
|
|
8a19fe29de | ||
|
|
bf1ace7dd3 | ||
|
|
c9037421ac | ||
|
|
c570980175 | ||
|
|
9ccf3fb996 | ||
|
|
2d737a1e4b | ||
|
|
88ffe05797 | ||
|
|
ad48464ec2 | ||
|
|
590d8f8263 | ||
|
|
a7ff3a6483 | ||
|
|
eab0079c90 | ||
|
|
193f28c7d5 | ||
|
|
3eb057c4a7 | ||
|
|
768ad70f70 | ||
|
|
3f73916f10 | ||
|
|
a7de2af46c | ||
|
|
9d141f9889 | ||
|
|
4a91f66b8f | ||
|
|
fa65f5ecf5 | ||
|
|
e7a83ec8df | ||
|
|
3fa9f9cfae | ||
|
|
825f47564a | ||
|
|
22ed362810 | ||
|
|
7404d756e9 | ||
|
|
40f7533cc1 | ||
|
|
e944ae6b2a | ||
|
|
4fcf8e9385 | ||
|
|
ed4aa4b624 | ||
|
|
f81be1aff6 | ||
|
|
e3c701ea38 | ||
|
|
5846e85283 | ||
|
|
920283ff2b | ||
|
|
c353f17d42 | ||
|
|
3ec8776940 | ||
|
|
32af676bd9 | ||
|
|
807c755670 | ||
|
|
cb1237a3ed | ||
|
|
af3c854074 | ||
|
|
0e48e35e04 | ||
|
|
4892bbc167 | ||
|
|
5e5b7cb4d4 | ||
|
|
44c8b7414c | ||
|
|
9ad09ce905 | ||
|
|
32c68428a9 | ||
|
|
41949bb71e | ||
|
|
7174c44557 | ||
|
|
a4acff3e21 | ||
|
|
3e25ddb07b | ||
|
|
57688ad7bf | ||
|
|
99e6c701e6 | ||
|
|
75bc3446f8 | ||
|
|
d714be0f57 | ||
|
|
be559e6c37 | ||
|
|
b039a4115f | ||
|
|
624488b5e8 | ||
|
|
cc3fe3bd30 | ||
|
|
aae5907cb7 | ||
|
|
07cdf0109f | ||
|
|
a149f9f3c0 | ||
|
|
b926690947 | ||
|
|
6cdeedb8de | ||
|
|
0a31836bed | ||
|
|
855bbc88c9 | ||
|
|
19d0a51533 | ||
|
|
f7327b6244 | ||
|
|
646debaf38 | ||
|
|
05c00a832c | ||
|
|
801ab18ea7 | ||
|
|
7d28a24c66 | ||
|
|
18bba63f39 | ||
|
|
4366f22dfc | ||
|
|
8326f95fe3 | ||
|
|
102c64e827 | ||
|
|
66e4b78519 | ||
|
|
99f3e0f0ed | ||
|
|
c939a67866 | ||
|
|
dfe6f0c1c6 | ||
|
|
a0da2fb2b7 | ||
|
|
e0bafc6da4 | ||
|
|
90cb3743be | ||
|
|
414db07bdb | ||
|
|
fea9f93166 | ||
|
|
a85254b898 | ||
|
|
fcd6f2de60 | ||
|
|
a0f370e78a | ||
|
|
676b564f43 | ||
|
|
d8202bf917 | ||
|
|
d7597f73cc | ||
|
|
b3cfeda3c7 | ||
|
|
27b5b46cb9 | ||
|
|
c2ee2e4c74 | ||
|
|
a197dc72c3 | ||
|
|
63f2d88088 | ||
|
|
35acda856a | ||
|
|
cd6a6e4cf2 | ||
|
|
7ba1e6b34d | ||
|
|
82021ad9df | ||
|
|
a5db319463 | ||
|
|
31a1c1e67c | ||
|
|
264536877d | ||
|
|
599b94ff14 | ||
|
|
025899e3b5 | ||
|
|
65067dff01 | ||
|
|
96663fd6ae | ||
|
|
d54220bc79 | ||
|
|
740d9ecdee | ||
|
|
efa1388cd3 | ||
|
|
e59b986fa7 | ||
|
|
11b354dd54 | ||
|
|
03db04c3ab | ||
|
|
9f0515c40c | ||
|
|
96a6f7f7f5 | ||
|
|
28808ca96d | ||
|
|
a5b39abd86 | ||
|
|
40f463b560 | ||
|
|
98457b6d60 | ||
|
|
5d2fe48785 | ||
|
|
c219d8d5c2 | ||
|
|
bada2049ca | ||
|
|
f1a8138055 | ||
|
|
ee137a7033 | ||
|
|
f8a68fd935 | ||
|
|
5d3e3a62a2 | ||
|
|
07c63c6fdf | ||
|
|
7350e808c5 | ||
|
|
bcf20963c1 | ||
|
|
feb92adc5c | ||
|
|
3080fc3971 | ||
|
|
05c60abfdb | ||
|
|
b215d1339f | ||
|
|
f3ff72e54b | ||
|
|
a0749fe483 | ||
|
|
199eb2b110 | ||
|
|
53b0f4ba4e | ||
|
|
65ada39360 | ||
|
|
15e01132cf | ||
|
|
10b208f28d | ||
|
|
9569a0b8ca | ||
|
|
d7c7522be9 | ||
|
|
972223c342 | ||
|
|
83cdb89f8a | ||
|
|
a5f98139c9 | ||
|
|
7d1aa7534d | ||
|
|
5f2f6180b9 | ||
|
|
2df32942d3 | ||
|
|
22a3fa0b2e | ||
|
|
249c20023d | ||
|
|
f4474e5724 | ||
|
|
d154301866 | ||
|
|
a3e6b50442 | ||
|
|
a4633b13d4 | ||
|
|
2d3bc71e89 | ||
|
|
9a495911c8 | ||
|
|
37bba7a678 | ||
|
|
ac60007bec | ||
|
|
8f69ca8dcd | ||
|
|
2e02579474 | ||
|
|
793fd6bce9 | ||
|
|
547665c720 | ||
|
|
59b0b38d3c | ||
|
|
2205546edf | ||
|
|
ee153deb1f | ||
|
|
b01d9fdab1 | ||
|
|
06eef1f70f | ||
|
|
d293f6dcff | ||
|
|
370997fb5d | ||
|
|
8b53c7232e | ||
|
|
dc586bff36 | ||
|
|
61a38bb274 | ||
|
|
de7d0256a3 | ||
|
|
5d67271db0 | ||
|
|
f3cd6931ca | ||
|
|
582469eef2 | ||
|
|
3051147019 | ||
|
|
6c73b2088a | ||
|
|
7821cc3b9f | ||
|
|
72c330f1e6 | ||
|
|
817b50826e | ||
|
|
59dfaa3f99 | ||
|
|
dee977b7a7 | ||
|
|
d661a75d54 | ||
|
|
5533f2490a | ||
|
|
9d473f1eac | ||
|
|
fbb6a27212 | ||
|
|
c34895e837 | ||
|
|
13dffa9d32 | ||
|
|
dc1d99e772 | ||
|
|
73ff4193be | ||
|
|
e63b2ba310 | ||
|
|
9bca9ef6cf | ||
|
|
c7eb0feed8 | ||
|
|
e77c8e45ba | ||
|
|
16e037bd46 | ||
|
|
7cf7148a8f | ||
|
|
ed6dee9a19 | ||
|
|
0cb43ec51c | ||
|
|
a0c9d0849a | ||
|
|
31ce1cbbb9 | ||
|
|
209b12e064 | ||
|
|
8baf3ffde6 | ||
|
|
6f9dfd9473 | ||
|
|
b394654c1e | ||
|
|
9a74b23297 | ||
|
|
d4867e099e | ||
|
|
fa6a4483e6 | ||
|
|
aa9c76d027 | ||
|
|
f308aa4e1e | ||
|
|
96404eb8e2 | ||
|
|
69c634a56d | ||
|
|
62fe6ba20c | ||
|
|
3a719696bc | ||
|
|
3a0de243c3 | ||
|
|
2d29263a9f | ||
|
|
7b42cdf95e | ||
|
|
97ba6b0d8b | ||
|
|
30f1b17262 | ||
|
|
fc4836b193 | ||
|
|
cd188d0398 | ||
|
|
bdce5849b7 | ||
|
|
367788cbc3 | ||
|
|
d23bc33dc1 | ||
|
|
e6a191de1b | ||
|
|
4ebd9a5366 | ||
|
|
5f8c22d415 | ||
|
|
11740abd6b | ||
|
|
202e6936d6 | ||
|
|
354a76bb80 | ||
|
|
a8a019d68a | ||
|
|
db8ef71353 | ||
|
|
64ec9f4dbe | ||
|
|
fd607635a4 | ||
|
|
e246dea9fe | ||
|
|
9d76fbd0c4 | ||
|
|
5846119e50 | ||
|
|
35353dc49a | ||
|
|
714d2d8ae1 | ||
|
|
8511c204c3 | ||
|
|
4fa32d67bf | ||
|
|
bb7ecb8704 | ||
|
|
a43678aa12 | ||
|
|
5c4d125d4c | ||
|
|
2d93cce03a | ||
|
|
1a98878bfe | ||
|
|
704a0ab0c9 | ||
|
|
aa74c30466 | ||
|
|
ad63bd169b | ||
|
|
69bab6e5a5 | ||
|
|
bec68d59a2 | ||
|
|
b6b15fc65c | ||
|
|
43e6fd1e2b | ||
|
|
f95b27c6f6 | ||
|
|
0cad701374 | ||
|
|
cc5c51e7f0 | ||
|
|
bec22af8d7 | ||
|
|
b15bfb9129 | ||
|
|
49b5ffe48c | ||
|
|
3759c6316d | ||
|
|
d2037b1bd4 | ||
|
|
af4143753f | ||
|
|
fd1ffa4692 | ||
|
|
27f168cf63 | ||
|
|
90318fbcbe | ||
|
|
35c80583f0 | ||
|
|
e46b3c3e70 | ||
|
|
e359812ce3 | ||
|
|
236522529c | ||
|
|
3d0a0f801b | ||
|
|
e2ef4e9e2f | ||
|
|
d19b6aa5ba | ||
|
|
d153fbc5a9 | ||
|
|
36a7d9fca4 | ||
|
|
9977de0028 | ||
|
|
78d24429f2 | ||
|
|
6b73e692c9 | ||
|
|
d91b643c87 | ||
|
|
1210c3b960 | ||
|
|
66b32f25d5 | ||
|
|
cb5af4e8a0 | ||
|
|
f80ad18afa | ||
|
|
506a764089 | ||
|
|
2c3933821f | ||
|
|
6c631ccfef | ||
|
|
a30b919872 | ||
|
|
18a9ae412f | ||
|
|
44494c09bc | ||
|
|
3891e0d13a | ||
|
|
3fc1bdc81c | ||
|
|
cd94cf60a2 | ||
|
|
ff2b5bda59 | ||
|
|
5da0579259 | ||
|
|
7faaf5a89a | ||
|
|
9bf11045db | ||
|
|
06b130579e | ||
|
|
fc9cdb723b | ||
|
|
f83c207d60 | ||
|
|
1bdd97a601 | ||
|
|
6d8892aacd | ||
|
|
91c6fb881e | ||
|
|
3309f2fbb9 | ||
|
|
57d5dc5688 | ||
|
|
e561d4100b | ||
|
|
16609880f8 | ||
|
|
70239ea1d3 | ||
|
|
7ddfe73e69 | ||
|
|
3e31ae5d70 | ||
|
|
bfbfb9dabd | ||
|
|
dcba479848 | ||
|
|
37ca6a7a2a | ||
|
|
ad0acc0aa9 | ||
|
|
fe202d99c8 | ||
|
|
191e15309f | ||
|
|
5d21a15cc3 | ||
|
|
68892410f7 | ||
|
|
4831e150c5 | ||
|
|
cedee4408b | ||
|
|
fb4c811835 | ||
|
|
ce73841cdc | ||
|
|
ccf051c317 | ||
|
|
0b8414832e | ||
|
|
2549f7d220 | ||
|
|
295c66911f | ||
|
|
4450288344 | ||
|
|
d1bce98597 | ||
|
|
06fa35568e | ||
|
|
fd4c42efab | ||
|
|
a7ada30ac6 | ||
|
|
3a04adce82 | ||
|
|
b2f49c69b1 | ||
|
|
e9aa0337ab | ||
|
|
bfadd9fdaf | ||
|
|
ac12cc85aa | ||
|
|
f0ccd9ffc6 | ||
|
|
d20053a556 | ||
|
|
6088713216 | ||
|
|
7b1a4e2400 | ||
|
|
ec8457d982 | ||
|
|
6fe75f9e45 | ||
|
|
e90bce7f08 | ||
|
|
6c44a71e4a | ||
|
|
f9a755d0d2 | ||
|
|
5ae49c43dc | ||
|
|
9a9eed472b | ||
|
|
e1b4cabbd6 | ||
|
|
a2f3ec1777 | ||
|
|
619c4e9f2e | ||
|
|
e05c6a25f9 | ||
|
|
9b1950b005 | ||
|
|
5611058766 | ||
|
|
917952453c | ||
|
|
14047b50b4 | ||
|
|
e9c0367fdc | ||
|
|
3e1eff251b | ||
|
|
ea0f26420d | ||
|
|
7f551c728c | ||
|
|
1e7f1b90e8 | ||
|
|
8ed3b74a0c | ||
|
|
d07a6fdedf | ||
|
|
354a1c27aa | ||
|
|
3b53d28e60 | ||
|
|
d2d1a50b04 | ||
|
|
5477d68300 | ||
|
|
a61d24e4d8 | ||
|
|
ce72bc6b65 | ||
|
|
1aa30bb71c | ||
|
|
f31d7ca85e | ||
|
|
b67ca4f07c | ||
|
|
8f13599a64 | ||
|
|
6615b9c287 | ||
|
|
c7a86a38a3 | ||
|
|
ed1df9d135 | ||
|
|
b55715d61a | ||
|
|
8e5a2096a9 | ||
|
|
7b8212f4d1 | ||
|
|
a90ac8b5b2 | ||
|
|
bdac9ef10d | ||
|
|
08a3062816 | ||
|
|
d7b5954f28 | ||
|
|
0a25b41f6d | ||
|
|
eea61cda7d | ||
|
|
805a330681 | ||
|
|
d1d692abe7 | ||
|
|
588db7cecf | ||
|
|
0c6a68fa36 | ||
|
|
a2b8a62abf | ||
|
|
0d5be6ce91 | ||
|
|
9ec1525eb5 | ||
|
|
31fe6cfe76 | ||
|
|
7b0ed8975d | ||
|
|
54bed8d2ea | ||
|
|
9f02f9fd5c | ||
|
|
4029c0b6a2 | ||
|
|
0f811bb7b6 | ||
|
|
56a5d0bd91 | ||
|
|
849c49a714 | ||
|
|
731eeb8dec | ||
|
|
002983e463 | ||
|
|
f7755163b7 | ||
|
|
dc1cd3daf2 | ||
|
|
b8fdaa7c42 | ||
|
|
f6efe70505 | ||
|
|
01a4de5c58 | ||
|
|
da5fbb8c36 | ||
|
|
c83af86f8b | ||
|
|
887a7b5714 | ||
|
|
a22bd7a3a8 | ||
|
|
3d5b6f234e | ||
|
|
bc8f292c05 | ||
|
|
d2a86e1c0f | ||
|
|
682d28abf7 | ||
|
|
c684d32fb8 | ||
|
|
9efaac30ae | ||
|
|
f3ab302270 | ||
|
|
f3aefc6d07 | ||
|
|
d8b7728b0e | ||
|
|
88460c017a | ||
|
|
e12c069d33 | ||
|
|
a2c87c7f29 | ||
|
|
263c587854 | ||
|
|
f030f34622 | ||
|
|
0dbb581cf4 | ||
|
|
9d8b913de5 | ||
|
|
0aa1a2c833 | ||
|
|
bc4cb277d3 | ||
|
|
66c35b083b | ||
|
|
402adc1df1 | ||
|
|
738016bd88 | ||
|
|
62a652a0d5 | ||
|
|
b7442f1bb8 | ||
|
|
0ecac37c40 | ||
|
|
40fe50daf6 | ||
|
|
218154e695 | ||
|
|
79f046f89e | ||
|
|
eb405a2192 | ||
|
|
7af270eb28 | ||
|
|
1e4cff9ddb | ||
|
|
6d3a2b4693 | ||
|
|
e177d26d0e | ||
|
|
7df8e4fc0a | ||
|
|
6ef6d31776 | ||
|
|
58e00df9fe | ||
|
|
72a2ab39ba | ||
|
|
7f9872387e | ||
|
|
e4d9d91462 | ||
|
|
ec2ecb7e12 | ||
|
|
e97577edde | ||
|
|
91d4d175ab | ||
|
|
85095dfd09 | ||
|
|
93740a2482 | ||
|
|
b8b880932e | ||
|
|
e68fd40e22 | ||
|
|
bb47fb0783 | ||
|
|
2e9dccef78 | ||
|
|
30ddfd49ed | ||
|
|
620a753185 | ||
|
|
da35fa2cb8 | ||
|
|
5c8d69bf6f | ||
|
|
cf65905974 | ||
|
|
a467a89f16 | ||
|
|
999370b756 | ||
|
|
a785ccd21a | ||
|
|
32e7b0864c | ||
|
|
4c55b1c16d | ||
|
|
963428a75d | ||
|
|
5686e6e33e | ||
|
|
78c9a53df7 | ||
|
|
a2de42041c | ||
|
|
c421d9afec | ||
|
|
661bce47ae | ||
|
|
d53e9c7392 | ||
|
|
fe2885d80a | ||
|
|
20c261b2fe | ||
|
|
09e522322a | ||
|
|
5ead86a35e | ||
|
|
a529826d95 | ||
|
|
41bc51ce2d | ||
|
|
7ef2fa6d0d | ||
|
|
f21c054903 | ||
|
|
ab8782d1e6 | ||
|
|
e072537e7f | ||
|
|
763a7b8ca3 | ||
|
|
b3a669bec1 | ||
|
|
623a11d7de | ||
|
|
433758ceb3 | ||
|
|
82fbaab53c | ||
|
|
4f03401628 | ||
|
|
da7add3525 | ||
|
|
54bf8c820f | ||
|
|
ad2d2e41de | ||
|
|
c4464526cd | ||
|
|
00cfa1a367 | ||
|
|
a573c0e9ed | ||
|
|
61eebb559e | ||
|
|
bd6eabd659 | ||
|
|
d209ccd4cc | ||
|
|
ab07bc1fff | ||
|
|
7e7ef44fab | ||
|
|
1307275b43 | ||
|
|
6eb83a63e1 | ||
|
|
3a04b507ec | ||
|
|
f167b06d4c | ||
|
|
7899f6a906 | ||
|
|
97f9fd6949 | ||
|
|
b419590893 | ||
|
|
217c05da52 | ||
|
|
e7d40afb7a | ||
|
|
82174e68b6 | ||
|
|
e3965913c4 | ||
|
|
c7920aba3e | ||
|
|
a7739be22f | ||
|
|
95c8f67a4c | ||
|
|
6814ba11bc | ||
|
|
58c25bf679 | ||
|
|
e7ce7c6bb2 | ||
|
|
e93259bb23 | ||
|
|
6818ca3c02 | ||
|
|
1fd32e9c2f | ||
|
|
f8850ccd85 | ||
|
|
ee4fa7d482 | ||
|
|
769d2d9b62 | ||
|
|
3e92365fa2 | ||
|
|
d9a3cb0b36 | ||
|
|
65ffdc2adf | ||
|
|
58cb3312d6 | ||
|
|
9177542b4d | ||
|
|
66bd861fcd | ||
|
|
0a416b3d97 | ||
|
|
5da591c529 | ||
|
|
59e76ec01d | ||
|
|
488544b336 | ||
|
|
0d88388912 | ||
|
|
41fb0eaa11 | ||
|
|
b6308f5b48 | ||
|
|
58c5df3d37 | ||
|
|
72bfb2523a | ||
|
|
0e836f523a | ||
|
|
007ac353dd | ||
|
|
609195e991 | ||
|
|
2cc1ab81c2 | ||
|
|
e3133e4db7 | ||
|
|
a976283c34 | ||
|
|
040196972c | ||
|
|
6ff0b24ef4 | ||
|
|
4c68aaabf1 | ||
|
|
3f00c9367d | ||
|
|
06f7c177c8 | ||
|
|
2694953ada | ||
|
|
6d60ed69a1 | ||
|
|
3e8d8f7fb3 | ||
|
|
e0f5d62bd6 | ||
|
|
e3f7c352dc | ||
|
|
8363df3703 | ||
|
|
759e841b24 | ||
|
|
44f87fbf36 | ||
|
|
8ac6fee856 | ||
|
|
5f0e62a3e5 | ||
|
|
5e824a88d0 | ||
|
|
254a5914ad | ||
|
|
7f0ab7c20c | ||
|
|
fa574ddd6f | ||
|
|
637713c1a4 | ||
|
|
700f876a1a | ||
|
|
c2fb85547d | ||
|
|
c39fb1fc4f | ||
|
|
3ead672394 | ||
|
|
8be12e770f | ||
|
|
5025eb05bd | ||
|
|
16cda039b5 | ||
|
|
006355c9fa | ||
|
|
4dc0662eca | ||
|
|
d63a7aa6cf | ||
|
|
7d001aff03 | ||
|
|
a890c5beb8 | ||
|
|
58d3dd466f | ||
|
|
19a44ffb7b | ||
|
|
019fd1d9ba | ||
|
|
9ad9cc71ff | ||
|
|
461e140afc | ||
|
|
af37d58cf7 | ||
|
|
4ac954ac3e | ||
|
|
fb3f078eeb | ||
|
|
e8768b338c | ||
|
|
1c22ace058 | ||
|
|
3b5475e9ee | ||
|
|
3c3d59aa39 | ||
|
|
4a72dd782d | ||
|
|
900d4cdb9e | ||
|
|
01c00953ff | ||
|
|
c814b34b1d | ||
|
|
66fda0cdb1 | ||
|
|
33c2b47de3 | ||
|
|
2cfb09caa7 | ||
|
|
831eba0eac | ||
|
|
bd2a00acdf | ||
|
|
5388143855 | ||
|
|
5c221bcd01 | ||
|
|
08089b575b | ||
|
|
e7ca69f1fa | ||
|
|
e5d8ac92a4 | ||
|
|
934691fabb | ||
|
|
af324e24df | ||
|
|
b3e0e555c8 | ||
|
|
74888bede8 | ||
|
|
4a6a9c79fd | ||
|
|
7a9c20f3fd | ||
|
|
2ec59b3ef3 | ||
|
|
961900fa17 | ||
|
|
b243f2feca | ||
|
|
3b3fafa637 | ||
|
|
928c42211f | ||
|
|
767fa3dc02 | ||
|
|
8946ad3000 | ||
|
|
de738496c2 | ||
|
|
eb063c8a9f | ||
|
|
7bc162f928 | ||
|
|
a89948320b | ||
|
|
0ffa84d740 | ||
|
|
aa7fbdf2cd | ||
|
|
a4bce453bc | ||
|
|
56dba3f3d0 | ||
|
|
5297bed454 | ||
|
|
07877c46e3 | ||
|
|
2ea5a9cc64 | ||
|
|
8e34de4756 | ||
|
|
97dd1591af | ||
|
|
b5cb3ac8ec | ||
|
|
8ed775f548 | ||
|
|
a109fddba4 | ||
|
|
c553d17f11 | ||
|
|
c4294440ff | ||
|
|
b6e58dcd22 | ||
|
|
470f5891d4 | ||
|
|
9222702633 | ||
|
|
b71146bde4 | ||
|
|
186b5de575 | ||
|
|
ee0963c58c | ||
|
|
e74a918621 | ||
|
|
6f7a47db5d | ||
|
|
83d2bc9b6d | ||
|
|
2eaabf06fc | ||
|
|
4da67537c1 | ||
|
|
ec28d4c247 | ||
|
|
be64a06b1c | ||
|
|
fe4d7248cc | ||
|
|
b3935ed2af | ||
|
|
515c51953f | ||
|
|
4f044f680c | ||
|
|
92055ca79b | ||
|
|
bdce2954c3 | ||
|
|
983ba59e3e | ||
|
|
1f86dcdd13 | ||
|
|
38363f4820 | ||
|
|
fc940f0703 | ||
|
|
a095472e62 | ||
|
|
471b1d54d5 | ||
|
|
3b09123de3 | ||
|
|
1bbf7013c8 | ||
|
|
e27301c7b3 | ||
|
|
c9f0e12353 | ||
|
|
65d81833bb | ||
|
|
8be649d908 | ||
|
|
e2edaa0cee | ||
|
|
b2907527e9 | ||
|
|
c0228f741e | ||
|
|
e1c93d1fb2 | ||
|
|
cf56832d00 | ||
|
|
203a2da30a | ||
|
|
7d1df603ad | ||
|
|
3890c8bce5 | ||
|
|
f27f902266 | ||
|
|
362d6ce834 | ||
|
|
cbc5a141f7 | ||
|
|
14684af0d0 | ||
|
|
34898e9766 | ||
|
|
ab3c94a54f | ||
|
|
ef68cd3249 | ||
|
|
0da13086bd | ||
|
|
dc2ffdeed7 | ||
|
|
d9b29029f9 | ||
|
|
0c84c2ef50 | ||
|
|
f78e681428 | ||
|
|
3c98c2d0cb | ||
|
|
d460e06cb9 | ||
|
|
08c5679380 | ||
|
|
e926dc9305 | ||
|
|
cce2e33c84 | ||
|
|
aa9a8dbda3 | ||
|
|
73f222d722 | ||
|
|
e0f97ae7ec | ||
|
|
526344aa5e | ||
|
|
19a9a6ba24 | ||
|
|
76760901fa |
No files matched your search
+1
-1
@@ -16,7 +16,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0beta1
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
|
||||
PHP_BUILD_CRT: vc15
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
|
||||
+18
-19
@@ -1,35 +1,34 @@
|
||||
# http://editorconfig.org/
|
||||
# https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*.{c,h,awk,w32,bat,mk,frag}]
|
||||
charset = utf-8
|
||||
[*]
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
tab_width = 4
|
||||
|
||||
[{*.{awk,bat,c,cpp,d,h,l,mk,re,skl,w32,y},Makefile*}]
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{php,phpt}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
[*.{dtd,html,inc,php,phpt,rng,wsdl,xml,xsd,xsl}]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{yml,m4,sh}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
[*.{ac,m4,sh,yml}]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
max_line_length = 80
|
||||
|
||||
[COMMIT_EDITMSG]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
max_line_length = 80
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = true
|
||||
+2
-1
@@ -67,7 +67,8 @@ before_script:
|
||||
|
||||
# Run PHPs run-tests.php
|
||||
script:
|
||||
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120
|
||||
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120
|
||||
- sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'
|
||||
|
||||
after_success:
|
||||
- ccache --show-stats
|
||||
@@ -1,6 +1,556 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 7.3.2
|
||||
21 Nov 2019, PHP 7.3.12
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78658 (Memory corruption using Closure::bindTo). (Nikita)
|
||||
. Fixed bug #78656 (Parse errors classified as highest log-level). (Erik
|
||||
Lundin)
|
||||
. Fixed bug #78752 (Segfault if GC triggered while generator stack frame is
|
||||
being destroyed). (Nikita)
|
||||
. Fixed bug #78689 (Closure::fromCallable() doesn't handle
|
||||
[Closure, '__invoke']). (Nikita)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #78694 (Appending to a variant array causes segfault). (cmb)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #70153 (\DateInterval incorrectly unserialized). (Maksim Iakunin)
|
||||
. Fixed bug #78751 (Serialising DatePeriod converts DateTimeImmutable). (cmb)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #78642 (Wrong libiconv version displayed). (gedas at martynas,
|
||||
cmb).
|
||||
|
||||
- OpCache:
|
||||
. Fixed bug #78654 (Incorrectly computed opcache checksum on files with
|
||||
non-ascii characters). (mhagstrand)
|
||||
. Fixed bug #78747 (OpCache corrupts custom extension result). (Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #78775 (TLS issues from HTTP request affecting other encrypted
|
||||
connections). (Nikita)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #78697 (ReflectionClass::ImplementsInterface - inaccurate error
|
||||
message with traits). (villfa)
|
||||
|
||||
- Sockets:
|
||||
. Fixed bug #78665 (Multicasting may leak memory). (cmb)
|
||||
|
||||
24 Oct 2019, PHP 7.3.11
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78535 (auto_detect_line_endings value not parsed as bool).
|
||||
(bugreportuser)
|
||||
. Fixed bug #78620 (Out of memory error). (cmb, Nikita)
|
||||
|
||||
- Exif :
|
||||
. Fixed bug #78442 ('Illegal component' on exif_read_data since PHP7)
|
||||
(Kalle)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #78599 (env_path_info underflow in fpm_main.c can lead to RCE).
|
||||
(CVE-2019-11043) (Jakub Zelenka)
|
||||
. Fixed bug #78413 (request_terminate_timeout does not take effect after
|
||||
fastcgi_finish_request). (Sergei Turchanov)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #78633 (Heap buffer overflow (read) in mb_eregi). (cmb)
|
||||
. Fixed bug #78579 (mb_decode_numericentity: args number inconsistency).
|
||||
(cmb)
|
||||
. Fixed bug #78609 (mb_check_encoding() no longer supports stringable
|
||||
objects). (cmb)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #76809 (SSL settings aren't respected when persistent connections
|
||||
are used). (fabiomsouto)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #78525 (Memory leak in pdo when reusing native prepared
|
||||
statements). (Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #78272 (calling preg_match() before pcntl_fork() will freeze
|
||||
child process). (Nikita)
|
||||
|
||||
- PDO_MySQL:
|
||||
. Fixed bug #78623 (Regression caused by "SP call yields additional empty
|
||||
result set"). (cmb)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #78624 (session_gc return value for user defined session
|
||||
handlers). (bshaffer)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #76342 (file_get_contents waits twice specified timeout).
|
||||
(Thomas Calvet)
|
||||
. Fixed bug #78612 (strtr leaks memory when integer keys are used and the
|
||||
subject string shorter). (Nikita)
|
||||
. Fixed bug #76859 (stream_get_line skips data if used with data-generating
|
||||
filter). (kkopachev)
|
||||
|
||||
- Zip:
|
||||
. Fixed bug #78641 (addGlob can modify given remove_path value). (cmb)
|
||||
|
||||
26 Sep 2019, PHP 7.3.10
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78220 (Can't access OneDrive folder). (cmb, ab)
|
||||
. Fixed bug #77922 (Double release of doc comment on inherited shadow
|
||||
property). (Nikita)
|
||||
. Fixed bug #78441 (Parse error due to heredoc identifier followed by digit).
|
||||
(cmb)
|
||||
. Fixed bug #77812 (Interactive mode does not support PHP 7.3-style heredoc).
|
||||
(cmb, Nikita)
|
||||
|
||||
- FastCGI:
|
||||
. Fixed bug #78469 (FastCGI on_accept hook is not called when using named
|
||||
pipes on Windows). (Sergei Turchanov)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #78334 (fpm log prefix message includes wrong stdout/stderr
|
||||
notation). (Tsuyoshi Sadakata)
|
||||
|
||||
- Intl:
|
||||
. Ensure IDNA2003 rules are used with idn_to_ascii() and idn_to_utf8()
|
||||
when requested. (Sara)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #78559 (Heap buffer overflow in mb_eregi). (cmb)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed connect_attr issues and added the _server_host connection attribute.
|
||||
(Qianqian Bu)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #78473 (odbc_close() closes arbitrary resources). (cmb)
|
||||
|
||||
- PDO_MySQL:
|
||||
. Fixed bug #41997 (SP call yields additional empty result set). (cmb)
|
||||
|
||||
- sodium:
|
||||
. Fixed bug #78510 (Partially uninitialized buffer returned by
|
||||
sodium_crypto_generichash_init()). (Frank Denis, cmb)
|
||||
|
||||
29 Aug 2019, PHP 7.3.9
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78363 (Buffer overflow in zendparse). (Nikita)
|
||||
. Fixed bug #78379 (Cast to object confuses GC, causes crash). (Dmitry)
|
||||
. Fixed bug #78412 (Generator incorrectly reports non-releasable $this as GC
|
||||
child). (Nikita)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug #77946 (Bad cURL resources returned by curl_multi_info_read()).
|
||||
(Abyr Valg)
|
||||
|
||||
- Exif:
|
||||
. Fixed bug #78333 (Exif crash (bus error) due to wrong alignment and
|
||||
invalid cast). (Nikita)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #77185 (Use-after-free in FPM master event handling).
|
||||
(Maksim Nikulin)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #78342 (Bus error in configure test for iconv //IGNORE). (Rainer
|
||||
Jung)
|
||||
|
||||
- LiteSpeed:
|
||||
. Updated to LiteSpeed SAPI V7.5 (Fixed clean shutdown). (George Wang)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #78380 (Oniguruma 6.9.3 fixes CVEs). (CVE-2019-13224) (Stas)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #78179 (MariaDB server version incorrectly detected). (cmb)
|
||||
. Fixed bug #78213 (Empty row pocket). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #77191 (Assertion failure in dce_live_ranges() when silencing is
|
||||
used). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #69100 (Bus error from stream_copy_to_stream (file -> SSL stream)
|
||||
with invalid length). (Nikita)
|
||||
. Fixed bug #78282 (atime and mtime mismatch). (cmb)
|
||||
. Fixed bug #78326 (improper memory deallocation on stream_get_contents()
|
||||
with fixed length buffer). (Albert Casademont)
|
||||
. Fixed bug #78346 (strip_tags no longer handling nested php tags). (cmb)
|
||||
|
||||
01 Aug 2019, PHP 7.3.8
|
||||
|
||||
- Core:
|
||||
. Added syslog.filter=raw option. (Erik Lundin)
|
||||
. Fixed bug #78212 (Segfault in built-in webserver). (cmb)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #69044 (discrepency between time and microtime). (krakjoe)
|
||||
. Updated timelib to 2018.02. (Derick)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #78256 (heap-buffer-overflow on exif_process_user_comment).
|
||||
(CVE-2019-11042) (Stas)
|
||||
. Fixed bug #78222 (heap-buffer-overflow on exif_scan_thumbnail).
|
||||
(CVE-2019-11041) (Stas)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #78039 (FTP with SSL memory leak). (Nikita)
|
||||
|
||||
- Libxml:
|
||||
. Fixed bug #78279 (libxml_disable_entity_loader settings is shared between
|
||||
requests (cgi-fcgi)). (Nikita)
|
||||
|
||||
- LiteSpeed:
|
||||
. Updated to LiteSpeed SAPI V7.4.3 (increased response header count limit from
|
||||
100 to 1000, added crash handler to cleanly shutdown PHP request, added
|
||||
CloudLinux mod_lsapi mode). (George Wang)
|
||||
. Fixed bug #76058 (After "POST data can't be buffered", using php://input
|
||||
makes huge tmp files). (George Wang)
|
||||
|
||||
- Openssl:
|
||||
. Fixed bug #78231 (Segmentation fault upon stream_socket_accept of exported
|
||||
socket-to-stream). (Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #78189 (file cache strips last character of uname hash). (cmb)
|
||||
. Fixed bug #78202 (Opcache stats for cache hits are capped at 32bit NUM).
|
||||
(cmb)
|
||||
. Fixed bug #78271 (Invalid result of if-else). (Nikita)
|
||||
. Fixed bug #78291 (opcache_get_configuration doesn't list all directives).
|
||||
(Andrew Collington)
|
||||
. Fixed bug #78341 (Failure to detect smart branch in DFA pass). (Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #78197 (PCRE2 version check in configure fails for "##.##-xxx"
|
||||
version strings). (pgnet, Peter Kokot)
|
||||
. Fixed bug #78338 (Array cross-border reading in PCRE). (cmb)
|
||||
|
||||
- PDO_Sqlite:
|
||||
. Fixed bug #78192 (SegFault when reuse statement after schema has changed).
|
||||
(Vincent Quatrevieux)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #77919 (Potential UAF in Phar RSHUTDOWN). (cmb)
|
||||
|
||||
- Phpdbg:
|
||||
. Fixed bug #78297 (Include unexistent file memory leak). (Nikita)
|
||||
|
||||
- SQLite:
|
||||
. Upgraded to SQLite 3.28.0. (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #78241 (touch() does not handle dates after 2038 in PHP 64-bit). (cmb)
|
||||
. Fixed bug #78269 (password_hash uses weak options for argon2). (Remi)
|
||||
|
||||
04 Jul 2019, PHP 7.3.7
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76980 (Interface gets skipped if autoloader throws an exception).
|
||||
(Nikita)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #78025 (segfault when accessing properties of DOMDocumentType).
|
||||
(cmb)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #77956 (When mysqli.allow_local_infile = Off, use a meaningful
|
||||
error message). (Sjon Hortensius)
|
||||
. Fixed bug #38546 (bindParam incorrect processing of bool types).
|
||||
(camporter)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #77955 (Random segmentation fault in mysqlnd from php-fpm).
|
||||
(Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #78015 (Incorrect evaluation of expressions involving partials
|
||||
arrays in SCCP). (Nikita)
|
||||
. Fixed bug #78106 (Path resolution fails if opcache disabled during request).
|
||||
(Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #78079 (openssl_encrypt_ccm.phpt fails with OpenSSL 1.1.1c).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #78050 (SegFault phpdbg + opcache on include file twice).
|
||||
(Nikita)
|
||||
|
||||
- Sockets:
|
||||
. Fixed bug #78038 (Socket_select fails when resource array contains
|
||||
references). (Nikita)
|
||||
|
||||
- Sodium:
|
||||
. Fixed bug #78114 (segfault when calling sodium_* functions from eval). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77135 (Extract with EXTR_SKIP should skip $this).
|
||||
(Craig Duncan, Dmitry)
|
||||
. Fixed bug #77937 (preg_match failed). (cmb, Anatol)
|
||||
|
||||
- Zip:
|
||||
. Fixed bug #76345 (zip.h not found). (Michael Maroszek)
|
||||
|
||||
30 May 2019, PHP 7.3.6
|
||||
|
||||
- cURL:
|
||||
. Implemented FR #72189 (Add missing CURL_VERSION_* constants). (Javier
|
||||
Spagnoletti)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #77909 (DatePeriod::__construct() with invalid recurrence count
|
||||
value). (Ignace Nyamagana Butera)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #77988 (heap-buffer-overflow on php_jpg_get16).
|
||||
(CVE-2019-11040) (Stas)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #77934 (php-fpm kill -USR2 not working). (Jakub Zelenka)
|
||||
. Fixed bug #77921 (static.php.net doesn't work anymore). (Peter Kokot)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #77943 (imageantialias($image, false); does not work). (cmb)
|
||||
. Fixed bug #77973 (Uninitialized read in gdImageCreateFromXbm).
|
||||
(CVE-2019-11038) (cmb)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #78069 (Out-of-bounds read in iconv.c:_php_iconv_mime_decode()
|
||||
due to integer overflow). (CVE-2019-11039). (maris dot adam)
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #77843 (Use after free with json serializer). (Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed possible crashes, because of inconsistent PCRE cache and opcache
|
||||
SHM reset. (Alexey Kalinin, Dmitry)
|
||||
|
||||
- PDO_MySQL:
|
||||
. Fixed bug #77944 (Wrong meta pdo_type for bigint on LLP64). (cmb)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #75186 (Inconsistent reflection of Closure:::__invoke()). (Nikita)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #77911 (Wrong warning for session.sid_bits_per_character). (cmb)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #77945 (Segmentation fault when constructing SoapClient with
|
||||
WSDL_CACHE_BOTH). (Nikita)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #77024 (SplFileObject::__toString() may return array). (Craig
|
||||
Duncan)
|
||||
|
||||
- SQLite:
|
||||
. Fixed bug #77967 (Bypassing open_basedir restrictions via file uris). (Stas)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77931 (Warning for array_map mentions wrong type). (Nikita)
|
||||
. Fixed bug #78003 (strip_tags output change since PHP 7.3). (cmb)
|
||||
|
||||
02 May 2019, PHP 7.3.5
|
||||
|
||||
- Core:
|
||||
. Fixed bug #77903 (ArrayIterator stops iterating after offsetSet call).
|
||||
(Nikita)
|
||||
|
||||
- CLI:
|
||||
. Fixed bug #77794 (Incorrect Date header format in built-in server).
|
||||
(kelunik)
|
||||
|
||||
- EXIF
|
||||
. Fixed bug #77950 (Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG).
|
||||
(CVE-2019-11036) (Stas)
|
||||
|
||||
- Interbase:
|
||||
. Fixed bug #72175 (Impossibility of creating multiple connections to
|
||||
Interbase with php 7.x). (Nikita)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #77895 (IntlDateFormatter::create fails in strict mode if $locale
|
||||
= null). (Nikita)
|
||||
|
||||
- LDAP:
|
||||
. Fixed bug #77869 (Core dump when using server controls) (mcmic)
|
||||
|
||||
- Mail
|
||||
. Fixed bug #77821 (Potential heap corruption in TSendMail()). (cmb)
|
||||
|
||||
- mbstring:
|
||||
. Implemented FR #72777 (Implement regex stack limits for mbregex functions).
|
||||
(Yasuo Ohgaki, Stas)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #77773 (Unbuffered queries leak memory - MySQLi / mysqlnd).
|
||||
(Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #77827 (preg_match does not ignore \r in regex flags). (requinix,
|
||||
cmb)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #77849 (Disable cloning of PDO handle/connection objects).
|
||||
(camporter)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #76801 (too many open files). (alekitto)
|
||||
. Fixed bug #77800 (phpdbg segfaults on listing some conditional breakpoints).
|
||||
(krakjoe)
|
||||
. Fixed bug #77805 (phpdbg build fails when readline is shared). (krakjoe)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #77772 (ReflectionClass::getMethods(null) doesn't work). (Nikita)
|
||||
. Fixed bug #77882 (Different behavior: always calls destructor). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77793 (Segmentation fault in extract() when overwriting
|
||||
reference with itself). (Nikita)
|
||||
. Fixed bug #77844 (Crash due to null pointer in parse_ini_string with
|
||||
INI_SCANNER_TYPED). (Nikita)
|
||||
. Fixed bug #77853 (Inconsistent substr_compare behaviour with empty
|
||||
haystack). (Nikita)
|
||||
|
||||
04 Apr 2019, PHP 7.3.4
|
||||
|
||||
- Core:
|
||||
. Fixed bug #77738 (Nullptr deref in zend_compile_expr). (Laruence)
|
||||
. Fixed bug #77660 (Segmentation fault on break 2147483648). (Laruence)
|
||||
. Fixed bug #77652 (Anonymous classes can lose their interface information).
|
||||
(Nikita)
|
||||
. Fixed bug #77345 (Stack Overflow caused by circular reference in garbage
|
||||
collection). (Alexandru Patranescu, Nikita, Dmitry)
|
||||
. Fixed bug #76956 (Wrong value for 'syslog.filter' documented in php.ini).
|
||||
(cmb)
|
||||
|
||||
- Apache2Handler:
|
||||
. Fixed bug #77648 (BOM in sapi/apache2handler/php_functions.c). (cmb)
|
||||
|
||||
- Bcmath:
|
||||
. Fixed bug #77742 (bcpow() implementation related to gcc compiler
|
||||
optimization). (Nikita)
|
||||
|
||||
- CLI Server:
|
||||
. Fixed bug #77722 (Incorrect IP set to $_SERVER['REMOTE_ADDR'] on the
|
||||
localhost). (Nikita)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #77578 (Crash when php unload). (cmb)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #77753 (Heap-buffer-overflow in php_ifd_get32s). (CVE-2019-11034)
|
||||
(Stas)
|
||||
. Fixed bug #77831 (Heap-buffer-overflow in exif_iif_add_value).
|
||||
(CVE-2019-11035) (Stas)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #77677 (FPM fails to build on AIX due to missing WCOREDUMP).
|
||||
(Kevin Adler)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #77700 (Writing truecolor images as GIF ignores interlace flag).
|
||||
(cmb)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #77597 (mysqli_fetch_field hangs scripts). (Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #77743 (Incorrect pi node insertion for jmpznz with identical
|
||||
successors). (Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #76127 (preg_split does not raise an error on invalid UTF-8).
|
||||
(Nikita)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #77697 (Crash on Big_Endian platform). (Laruence)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #77767 (phpdbg break cmd aliases listed in help do not match
|
||||
actual aliases). (Miriam Lauter)
|
||||
|
||||
- sodium:
|
||||
. Fixed bug #77646 (sign_detached() strings not terminated). (Frank)
|
||||
|
||||
- SQLite3:
|
||||
. Added sqlite3.defensive INI directive. (BohwaZ)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77664 (Segmentation fault when using undefined constant in
|
||||
custom wrapper). (Laruence)
|
||||
. Fixed bug #77669 (Crash in extract() when overwriting extracted array).
|
||||
(Nikita)
|
||||
. Fixed bug #76717 (var_export() does not create a parsable value for
|
||||
PHP_INT_MIN). (Nikita)
|
||||
. Fixed bug #77765 (FTP stream wrapper should set the directory as
|
||||
executable). (Vlad Temian)
|
||||
|
||||
07 Mar 2019, PHP 7.3.3
|
||||
|
||||
- Core:
|
||||
. Fixed bug #77589 (Core dump using parse_ini_string with numeric sections).
|
||||
(Laruence)
|
||||
. Fixed bug #77329 (Buffer Overflow via overly long Error Messages).
|
||||
(Dmitry)
|
||||
. Fixed bug #77494 (Disabling class causes segfault on member access).
|
||||
(Dmitry)
|
||||
. Fixed bug #77498 (Custom extension Segmentation fault when declare static
|
||||
property). (Nikita)
|
||||
. Fixed bug #77530 (PHP crashes when parsing `(2)::class`). (Ekin)
|
||||
. Fixed bug #77546 (iptcembed broken function). (gdegoulet)
|
||||
. Fixed bug #77630 (rename() across the device may allow unwanted access
|
||||
during processing). (Stas)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #77621 (Already defined constants are not properly reported).
|
||||
(cmb)
|
||||
. Fixed bug #77626 (Persistence confusion in php_com_import_typelib()). (cmb)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #77509 (Uninitialized read in exif_process_IFD_in_TIFF). (Stas)
|
||||
. Fixed bug #77540 (Invalid Read on exif_process_SOFn). (Stas)
|
||||
. Fixed bug #77563 (Uninitialized read in exif_process_IFD_in_MAKERNOTE). (Stas)
|
||||
. Fixed bug #77659 (Uninitialized read in exif_process_IFD_in_MAKERNOTE). (Stas)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #77514 (mb_ereg_replace() with trailing backslash adds null byte).
|
||||
(Nikita)
|
||||
|
||||
- MySQL
|
||||
. Disabled LOCAL INFILE by default, can be enabled using php.ini directive
|
||||
mysqli.allow_local_infile for mysqli, or PDO::MYSQL_ATTR_LOCAL_INFILE
|
||||
attribute for pdo_mysql. (Darek Slusarczyk)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #77390 (feof might hang on TLS streams in case of fragmented TLS
|
||||
records). (Abyl Valg, Jakub Zelenka)
|
||||
|
||||
- PDO_OCI:
|
||||
. Support Oracle Database tracing attributes ACTION, MODULE,
|
||||
CLIENT_INFO, and CLIENT_IDENTIFIER. (Cameron Porter)
|
||||
|
||||
- PHAR:
|
||||
. Fixed bug #77396 (Null Pointer Dereference in phar_create_or_parse_filename).
|
||||
(bishop)
|
||||
. Fixed bug #77586 (phar_tar_writeheaders_int() buffer overflow). (bishop)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #51068 (DirectoryIterator glob:// don't support current path
|
||||
relative queries). (Ahmed Abdou)
|
||||
. Fixed bug #77431 (openFile() silently truncates after a null byte). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77552 (Unintialized php_stream_statbuf in stat functions).
|
||||
(John Stevenson)
|
||||
. Fixed bug #77612 (setcookie() sets incorrect SameSite header if all of its
|
||||
options filled). (Nikita)
|
||||
|
||||
07 Feb 2019, PHP 7.3.2
|
||||
|
||||
- Core:
|
||||
. Fixed bug #77369 (memcpy with negative length via crafted DNS response). (Stas)
|
||||
@@ -61,6 +611,8 @@ PHP NEWS
|
||||
(Nikita)
|
||||
. Fixed bug #77361 (configure fails on 64-bit AIX when opcache enabled).
|
||||
(Kevin Adler)
|
||||
. Fixed bug #77287 (Opcache literal compaction is incompatible with EXT
|
||||
opcodes). (Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #77338 (get_browser with empty string). (Nikita)
|
||||
@@ -188,6 +740,7 @@ PHP NEWS
|
||||
. Removed support for BeOS. (Kalle)
|
||||
. Add PHP_VERSION to phpinfo() <title/>. (github/MattJeevas)
|
||||
. Add net_get_interfaces(). (Sara, Joe, Anatol)
|
||||
. Added gc_status(). (Benjamin Eberlei)
|
||||
. Implemented flexible heredoc and nowdoc syntax, per
|
||||
RFC https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes.
|
||||
(Thomas Punt)
|
||||
@@ -443,7 +996,7 @@ PHP NEWS
|
||||
- pgsql:
|
||||
. Added new error constants for pg_result_error(): PGSQL_DIAG_SCHEMA_NAME,
|
||||
PGSQL_DIAG_TABLE_NAME, PGSQL_DIAG_COLUMN_NAME, PGSQL_DIAG_DATATYPE_NAME,
|
||||
PGSQL_DIAG_CONSTRAINT_NAME and PGSQL_DIAG_SEVERITY_NONLOCALIZED. (Kalle)
|
||||
PGSQL_DIAG_CONSTRAINT_NAME and PGSQL_DIAG_SEVERITY_NONLOCALIZED. (Kalle)
|
||||
. Fixed bug #77047 (pg_convert has a broken regex for the 'TIME WITHOUT
|
||||
TIMEZONE' data type). (Andy Gajetzki)
|
||||
|
||||
|
||||
@@ -167,13 +167,7 @@ TSRM_API const char *tsrm_api_name(void);
|
||||
#define TSRMG_BULK_STATIC(id, type) ((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)])
|
||||
#define TSRMLS_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE;
|
||||
#define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL;
|
||||
#if ZEND_DEBUG
|
||||
#define TSRMLS_CACHE_UPDATE() TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#define TSRMLS_CACHE_RESET()
|
||||
#else
|
||||
#define TSRMLS_CACHE_UPDATE() if (!TSRMLS_CACHE) TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#define TSRMLS_CACHE_RESET() TSRMLS_CACHE = NULL
|
||||
#endif
|
||||
#define TSRMLS_CACHE _tsrm_ls_cache
|
||||
|
||||
/* BC only */
|
||||
|
||||
+1
-1
@@ -770,7 +770,7 @@ static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {
|
||||
// Note that LONGLONG is a 64-bit value
|
||||
LONGLONG ll;
|
||||
|
||||
ll = Int32x32To64(t, 10000000) + 116444736000000000;
|
||||
ll = t * 10000000LL + 116444736000000000LL;
|
||||
pft->dwLowDateTime = (DWORD)ll;
|
||||
pft->dwHighDateTime = ll >> 32;
|
||||
}
|
||||
|
||||
@@ -273,6 +273,10 @@ FPM:
|
||||
disabling output decoration for workers output when catch_workers_output
|
||||
enabled.
|
||||
. The getallheaders() function is now also available.
|
||||
. In PHP 7.3.11 a new pool option
|
||||
request_terminate_timeout_track_finished has been added. When enabled,
|
||||
request_terminate_timeout will also apply after fastcgi_finish_request()
|
||||
has been called, as well as during execution of shutdown functions.
|
||||
|
||||
========================================
|
||||
4. Deprecated Functionality
|
||||
@@ -399,6 +403,8 @@ Core:
|
||||
platform, the function returns false.
|
||||
. Added net_get_interfaces() to retrieve an array of available network
|
||||
interfaces including several details.
|
||||
. Added the gc_status() function to retrieve status information regarding the
|
||||
cyclic GC.
|
||||
|
||||
Date:
|
||||
. Added the DateTime::createFromImmutable() method, which mirrors
|
||||
@@ -620,9 +626,11 @@ Curl:
|
||||
. CURL_SSLVERSION_MAX_TLSv1_2
|
||||
. CURL_SSLVERSION_MAX_TLSv1_3
|
||||
. CURL_SSLVERSION_TLSv1_3
|
||||
. CURL_VERSION_ALTSVC
|
||||
. CURL_VERSION_ASYNCHDNS
|
||||
. CURL_VERSION_BROTLI
|
||||
. CURL_VERSION_CONV
|
||||
. CURL_VERSION_CURLDEBUG
|
||||
. CURL_VERSION_DEBUG
|
||||
. CURL_VERSION_GSSAPI
|
||||
. CURL_VERSION_GSSNEGOTIATE
|
||||
@@ -632,6 +640,7 @@ Curl:
|
||||
. CURL_VERSION_MULTI_SSL
|
||||
. CURL_VERSION_NTLM
|
||||
. CURL_VERSION_NTLM_WB
|
||||
. CURL_VERSION_PSL
|
||||
. CURL_VERSION_SPNEGO
|
||||
. CURL_VERSION_SSPI
|
||||
. CURL_VERSION_TLSAUTH_SRP
|
||||
@@ -725,6 +734,10 @@ LDAP:
|
||||
. New INI to set syslog ident string which is prepended to every message. It
|
||||
is used only when error_log is set syslog.
|
||||
|
||||
- mbstring.regex_stack_limit
|
||||
. New INI directive (since 7.3.5) limiting stack depth of mbstring/oniguruma
|
||||
regular expressions.
|
||||
|
||||
========================================
|
||||
12. Windows Support
|
||||
========================================
|
||||
@@ -742,4 +755,3 @@ LDAP:
|
||||
|
||||
. The cyclic GC has been enhanced, which may result in considerable performance
|
||||
improvements.
|
||||
|
||||
@@ -140,6 +140,7 @@ assert(0 && ($a = function () {
|
||||
if ($a) {
|
||||
} elseif ($b) {
|
||||
}
|
||||
if ($a); else;
|
||||
}));
|
||||
|
||||
?>
|
||||
@@ -292,4 +293,7 @@ Warning: assert(): assert(0 && ($a = function () {
|
||||
if ($a) {
|
||||
} elseif ($b) {
|
||||
}
|
||||
if ($a) {
|
||||
} else {
|
||||
}
|
||||
})) failed in %sexpect_015.php on line %d
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
AST pretty-printer
|
||||
--INI--
|
||||
zend.assertions=1
|
||||
assert.exception=0
|
||||
--FILE--
|
||||
<?php
|
||||
assert(0 && ($a = function () {
|
||||
$var = 'test';
|
||||
$str = "$var, $var[1], {$var}[], {$var[1]}[], ${var}[], ${var[1]}[]";
|
||||
}));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: assert(): assert(0 && ($a = function () {
|
||||
$var = 'test';
|
||||
$str = "$var, {$var[1]}, {$var}[], {$var[1]}[], {$var}[], {$var[1]}[]";
|
||||
})) failed in %sexpect_020.php on line %d
|
||||
@@ -46,7 +46,7 @@ elseif (PHP_OS == 'FreeBSD') {
|
||||
die('skip Not enough memory.');
|
||||
}
|
||||
} elseif (PHP_OS == "WINNT") {
|
||||
$s = trim(shell_exec("wmic OS get FreeVirtualMemory /Value 2>nil"));
|
||||
$s = trim(shell_exec("wmic OS get FreeVirtualMemory /Value 2>nul"));
|
||||
$freeMemory = explode('=', $s)[1]*1;
|
||||
|
||||
if ($freeMemory < 2.1*1024*1024) {
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
--TEST--
|
||||
Bug #77345 (Segmentation faults stack overflow in cyclic garbage collector) (Bug #77427)
|
||||
--INI--
|
||||
zend.enable_gc = 1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Node
|
||||
{
|
||||
/** @var Node */
|
||||
public $previous;
|
||||
/** @var Node */
|
||||
public $next;
|
||||
}
|
||||
|
||||
var_dump(gc_enabled());
|
||||
var_dump('start');
|
||||
|
||||
$firstNode = new Node();
|
||||
$firstNode->previous = $firstNode;
|
||||
$firstNode->next = $firstNode;
|
||||
|
||||
$circularDoublyLinkedList = $firstNode;
|
||||
|
||||
for ($i = 0; $i < 200000; $i++) {
|
||||
$currentNode = $circularDoublyLinkedList;
|
||||
$nextNode = $circularDoublyLinkedList->next;
|
||||
|
||||
$newNode = new Node();
|
||||
|
||||
$newNode->previous = $currentNode;
|
||||
$currentNode->next = $newNode;
|
||||
$newNode->next = $nextNode;
|
||||
$nextNode->previous = $newNode;
|
||||
|
||||
$circularDoublyLinkedList = $nextNode;
|
||||
}
|
||||
var_dump('end');
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
string(5) "start"
|
||||
string(3) "end"
|
||||
@@ -0,0 +1,48 @@
|
||||
--TEST--
|
||||
Bug #77345 (Segmentation faults stack overflow in cyclic garbage collector) (Bug #77427)
|
||||
--INI--
|
||||
zend.enable_gc = 1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Node
|
||||
{
|
||||
/** @var Node */
|
||||
public $previous;
|
||||
/** @var Node */
|
||||
public $next;
|
||||
}
|
||||
|
||||
var_dump(gc_enabled());
|
||||
var_dump('start');
|
||||
|
||||
function xxx() {
|
||||
$firstNode = new Node();
|
||||
$firstNode->previous = $firstNode;
|
||||
$firstNode->next = $firstNode;
|
||||
|
||||
$circularDoublyLinkedList = $firstNode;
|
||||
|
||||
for ($i = 0; $i < 300000; $i++) {
|
||||
$currentNode = $circularDoublyLinkedList;
|
||||
$nextNode = $circularDoublyLinkedList->next;
|
||||
|
||||
$newNode = new Node();
|
||||
|
||||
$newNode->previous = $currentNode;
|
||||
$currentNode->next = $newNode;
|
||||
$newNode->next = $nextNode;
|
||||
$nextNode->previous = $newNode;
|
||||
|
||||
$circularDoublyLinkedList = $nextNode;
|
||||
}
|
||||
}
|
||||
|
||||
xxx();
|
||||
gc_collect_cycles();
|
||||
|
||||
var_dump('end');
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
string(5) "start"
|
||||
string(3) "end"
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #77494 (Disabling class causes segfault on member access)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
|
||||
--INI--
|
||||
disable_classes=CURLFile
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new CURLFile();
|
||||
var_dump($a->name);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: CURLFile() has been disabled for security reasons in %sbug77494.php on line 2
|
||||
|
||||
Notice: Undefined property: CURLFile::$name in %sbug77494.php on line 3
|
||||
NULL
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #77530: PHP crashes when parsing '(2)::class'
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
echo (2)::class;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Illegal class name in %s on line %d
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
BUG #77589 (Core dump using parse_ini_string with numeric sections)
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(
|
||||
parse_ini_string(<<<INI
|
||||
[0]
|
||||
a = 1
|
||||
b = on
|
||||
c = true
|
||||
|
||||
["true"]
|
||||
a = 100
|
||||
b = null
|
||||
c = yes
|
||||
INI
|
||||
, TRUE, INI_SCANNER_TYPED));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
array(3) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
bool(true)
|
||||
["c"]=>
|
||||
bool(true)
|
||||
}
|
||||
["true"]=>
|
||||
array(3) {
|
||||
["a"]=>
|
||||
int(100)
|
||||
["b"]=>
|
||||
NULL
|
||||
["c"]=>
|
||||
bool(true)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
'I' => function() {
|
||||
return new class implements I {};
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #77652: Anonymous classes can lose their interface information
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface I {}
|
||||
require __DIR__ . '/bug77652.inc';
|
||||
$data = require __DIR__ . '/bug77652.inc';
|
||||
print_r(class_implements($data['I']()));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Array
|
||||
(
|
||||
[I] => I
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #77660 (Segmentation fault on break 2147483648)
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
for(;;) break 2147483648;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot 'break' 2147483648 levels in %sbug77660.php on line %d
|
||||
@@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
Bug #77738 (Nullptr deref in zend_compile_expr)
|
||||
--FILE--
|
||||
<?php
|
||||
__COMPILER_HALT_OFFSET__;
|
||||
; // <- important
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant __COMPILER_HALT_OFFSET__ - assumed '__COMPILER_HALT_OFFSET__' %sbug77738.php on line %d
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #77922: Double release of doc comment on inherited shadow property
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
/** Foo */
|
||||
private $prop;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,7 @@
|
||||
--TEST--
|
||||
Bug #77993 (Wrong parse error for invalid hex literal on Windows)
|
||||
--FILE--
|
||||
<?php
|
||||
0xg10;
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected 'xg10' (T_STRING) in %s on line %d
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #78010: Segmentation fault during GC
|
||||
--INI--
|
||||
memory_limit=2G
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->x = $this;
|
||||
|
||||
for ($i = 0; $i < 898; $i++) { //Will not trigger with <898
|
||||
$obj = [new stdClass, new stdClass]; //This must have at least 2 elements
|
||||
$this->y[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 2; ++$i) { //This must run >=2 (increasing the number of elements in the array *2 will not do)
|
||||
$x = []; //This must be reset
|
||||
foreach (array_fill(0, 389, 'x') as &$params) { //Will not trigger <389
|
||||
$x[] = new foo;
|
||||
}
|
||||
}
|
||||
|
||||
echo "Completed\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Completed
|
||||
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #78271: Invalid result of if-else
|
||||
--FILE--
|
||||
<?php
|
||||
function test($a, $b){
|
||||
if ($a==10) {
|
||||
$w="x";
|
||||
} else {
|
||||
$w="y";
|
||||
}
|
||||
|
||||
if ($b) {
|
||||
$d1="none";
|
||||
$d2="block";
|
||||
} else {
|
||||
$d1="block";
|
||||
$d2="none";
|
||||
}
|
||||
|
||||
echo $d2.$b."\n";
|
||||
|
||||
}
|
||||
|
||||
test(1, 1);
|
||||
?>
|
||||
--EXPECT--
|
||||
block1
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #78379 (Cast to object confuses GC, causes crash)
|
||||
--INI--
|
||||
opcache.enable=0
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
public function __construct() {
|
||||
$this->p = (object)["x" => [1]];
|
||||
}
|
||||
}
|
||||
class E {
|
||||
}
|
||||
$e = new E;
|
||||
$e->f = new E;
|
||||
$e->f->e = $e;
|
||||
$e->a = new C;
|
||||
$e = null;
|
||||
gc_collect_cycles();
|
||||
var_dump(new C);
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(C)#%d (1) {
|
||||
["p"]=>
|
||||
object(stdClass)#%d (1) {
|
||||
["x"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #78379.2 (Cast to object confuses GC, causes crash)
|
||||
--FILE--
|
||||
<?php
|
||||
class E {}
|
||||
function f() {
|
||||
$e1 = new E;
|
||||
$e2 = new E;
|
||||
$a = ['e2' => $e2];
|
||||
$e1->a = (object)$a;
|
||||
$e2->e1 = $e1;
|
||||
$e2->a = (object)$a;
|
||||
}
|
||||
f();
|
||||
gc_collect_cycles();
|
||||
echo "End\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
End
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #78658: Memory corruption using Closure::bindTo()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$c = function(){};
|
||||
|
||||
$scope = "AAAA";
|
||||
$scope = "{$scope}BBBB";
|
||||
$c->bindTo(new stdClass, $scope);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Class 'AAAABBBB' not found in %s on line %d
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #78689: Closure::fromCallable() doesn't handle [Closure, '__invoke']
|
||||
--FILE--
|
||||
<?php
|
||||
$a = [function () { echo "123\n"; }, '__invoke'];
|
||||
$a();
|
||||
|
||||
$b = Closure::fromCallable($a);
|
||||
$b();
|
||||
?>
|
||||
--EXPECT--
|
||||
123
|
||||
123
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #78752: Segfault if GC triggered while generator stack frame is being destroyed
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function gen(&$gen) {
|
||||
$a = new stdClass;
|
||||
$a->a = $a;
|
||||
$b = new stdClass;
|
||||
$b->b = $b;
|
||||
yield 1;
|
||||
}
|
||||
|
||||
$gen = gen($gen);
|
||||
var_dump($gen->current());
|
||||
for ($i = 0; $i < 9999; $i++) {
|
||||
$a = new stdClass;
|
||||
$a->a = $a;
|
||||
}
|
||||
$gen->next();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Immediately invoked closure with extra args
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
(function() {})(new stdClass);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Calling exception getters when properties hold references
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class MyException extends Exception {
|
||||
public function __construct(&$refMsg, &$refCode, &$refFile, &$refLine) {
|
||||
$this->message =& $refMsg;
|
||||
$this->code =& $refCode;
|
||||
$this->file =& $refFile;
|
||||
$this->line =& $refLine;
|
||||
}
|
||||
}
|
||||
|
||||
$refMsg = "foo";
|
||||
$refCode = 0;
|
||||
$refFile = "foobar";
|
||||
$refLine = 42;
|
||||
$ex = new MyException($refMsg, $refCode, $refFile, $refLine);
|
||||
var_dump($ex->getMessage());
|
||||
var_dump($ex->getCode());
|
||||
var_dump($ex->getFile());
|
||||
var_dump($ex->getLine());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(3) "foo"
|
||||
int(0)
|
||||
string(6) "foobar"
|
||||
int(42)
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Perform a packed to hash insert when the iterator is at the end of the array
|
||||
--FILE--
|
||||
|
||||
<?php
|
||||
$a = [];
|
||||
$a[1] = 1;
|
||||
foreach ($a as $k => &$v) {
|
||||
var_dump($v);
|
||||
if ($k == 1) $a[4] = 4;
|
||||
if ($k == 4) $a[2] = 2;
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(4)
|
||||
int(2)
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
GC 041: Handling of references in nested data of objects with destructor
|
||||
--INI--
|
||||
zend.enable_gc = 1
|
||||
--FILE--
|
||||
<?php
|
||||
class ryat {
|
||||
var $ryat;
|
||||
var $chtg;
|
||||
var $nested;
|
||||
function __destruct() {
|
||||
$GLOBALS['x'] = $this;
|
||||
}
|
||||
}
|
||||
$o = new ryat;
|
||||
$o->nested = [];
|
||||
$o->nested[] =& $o->nested;
|
||||
$o->ryat = $o;
|
||||
$x =& $o->chtg;
|
||||
unset($o);
|
||||
gc_collect_cycles();
|
||||
var_dump($x);
|
||||
?>
|
||||
--EXPECT--
|
||||
object(ryat)#1 (3) {
|
||||
["ryat"]=>
|
||||
*RECURSION*
|
||||
["chtg"]=>
|
||||
*RECURSION*
|
||||
["nested"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
*RECURSION*
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Object properties HT may need to be removed from nested data
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public function __destruct() {
|
||||
$GLOBALS['x'] = $this;
|
||||
}
|
||||
}
|
||||
|
||||
$t = new Test;
|
||||
$t->x = new stdClass;
|
||||
$t->x->t = $t;
|
||||
$a = (array) $t->x;
|
||||
unset($t, $a);
|
||||
gc_collect_cycles();
|
||||
var_dump($x);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(Test)#1 (1) {
|
||||
["x"]=>
|
||||
object(stdClass)#2 (1) {
|
||||
["t"]=>
|
||||
*RECURSION*
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #78441 (Parse error due to heredoc identifier followed by digit)
|
||||
--FILE--
|
||||
<?php
|
||||
echo <<<FOO
|
||||
FOO4
|
||||
FOO, PHP_EOL;
|
||||
|
||||
echo <<<FOO
|
||||
bar
|
||||
FOO4
|
||||
FOO, PHP_EOL;
|
||||
|
||||
echo <<<'FOO'
|
||||
bar
|
||||
FOO4
|
||||
FOO, PHP_EOL;
|
||||
?>
|
||||
--EXPECT--
|
||||
FOO4
|
||||
bar
|
||||
FOO4
|
||||
bar
|
||||
FOO4
|
||||
@@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
Using __COMPILER_HALF_OFFSET__ with trailing {} (OSS-Fuzz #17895)
|
||||
--FILE--
|
||||
<?php
|
||||
__COMPILER_HALT_OFFSET__;
|
||||
{}
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant __COMPILER_HALT_OFFSET__ - assumed '__COMPILER_HALT_OFFSET__' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Inherit internal static property into userland class
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('zend-test')) die('skip requires zend-test'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test extends _ZendTestClass {
|
||||
}
|
||||
|
||||
var_dump(Test::$_StaticProp);
|
||||
_ZendTestClass::$_StaticProp = 42;
|
||||
var_dump(Test::$_StaticProp);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
NULL
|
||||
int(42)
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug object gc not working in shutdown
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set('memory_limit', '2M');
|
||||
register_shutdown_function(function () {
|
||||
for ($n = 1000 * 1000; $n--;) {
|
||||
new stdClass;
|
||||
}
|
||||
echo "OK\n";
|
||||
});
|
||||
?>
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Memory leak on ** with result==op1 array
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$x = [0];
|
||||
$x **= 1;
|
||||
var_dump($x);
|
||||
|
||||
$x = [0];
|
||||
$x **= $x;
|
||||
var_dump($x);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(0)
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Calling a static method on a non-existing class
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$str = "foo";
|
||||
try {
|
||||
Test::{$str . "bar"}();
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Class 'Test' not found
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
The parent class is not necessarily the class of the prototype
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function test(): B {}
|
||||
}
|
||||
class B extends A {}
|
||||
class C extends B {
|
||||
function test(): parent {}
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
No warnings should be thrown during heredoc scan-ahead
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
<<<TEST
|
||||
${x}
|
||||
\400
|
||||
${/*}
|
||||
TEST;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Unexpected character in input: '' (ASCII=1) state=0 in %s on line %d
|
||||
|
||||
Warning: Octal escape sequence overflow \400 is greater than \377 in %s on line %d
|
||||
|
||||
Warning: Unterminated comment starting line %d in %s on line %d
|
||||
|
||||
Parse error: syntax error, unexpected end of file in %s on line %d
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "3.3.2-dev"
|
||||
#define ZEND_VERSION "3.3.12"
|
||||
|
||||
#define ZEND_ENGINE_3
|
||||
|
||||
|
||||
+34
-13
@@ -2051,13 +2051,13 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
|
||||
}
|
||||
|
||||
name_len = strlen(module->name);
|
||||
lcname = zend_string_alloc(name_len, 1);
|
||||
lcname = zend_string_alloc(name_len, module->type == MODULE_PERSISTENT);
|
||||
zend_str_tolower_copy(ZSTR_VAL(lcname), module->name, name_len);
|
||||
|
||||
lcname = zend_new_interned_string(lcname);
|
||||
if ((module_ptr = zend_hash_add_mem(&module_registry, lcname, module, sizeof(zend_module_entry))) == NULL) {
|
||||
zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name);
|
||||
zend_string_release_ex(lcname, 1);
|
||||
zend_string_release(lcname);
|
||||
return NULL;
|
||||
}
|
||||
module = module_ptr;
|
||||
@@ -2065,14 +2065,14 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
|
||||
|
||||
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAILURE) {
|
||||
zend_hash_del(&module_registry, lcname);
|
||||
zend_string_release_ex(lcname, 1);
|
||||
zend_string_release(lcname);
|
||||
EG(current_module) = NULL;
|
||||
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EG(current_module) = NULL;
|
||||
zend_string_release_ex(lcname, 1);
|
||||
zend_string_release(lcname);
|
||||
return module;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2279,14 +2279,14 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
lowercase_name = zend_string_tolower_ex(internal_function->function_name, 1);
|
||||
lowercase_name = zend_string_tolower_ex(internal_function->function_name, type == MODULE_PERSISTENT);
|
||||
lowercase_name = zend_new_interned_string(lowercase_name);
|
||||
reg_function = malloc(sizeof(zend_internal_function));
|
||||
memcpy(reg_function, &function, sizeof(zend_internal_function));
|
||||
if (zend_hash_add_ptr(target_function_table, lowercase_name, reg_function) == NULL) {
|
||||
unload=1;
|
||||
free(reg_function);
|
||||
zend_string_release_ex(lowercase_name, 1);
|
||||
zend_string_release(lowercase_name);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2378,7 +2378,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
|
||||
}
|
||||
ptr++;
|
||||
count++;
|
||||
zend_string_release_ex(lowercase_name, 1);
|
||||
zend_string_release(lowercase_name);
|
||||
}
|
||||
if (unload) { /* before unloading, display all remaining bad function in the module */
|
||||
if (scope) {
|
||||
@@ -2724,10 +2724,10 @@ static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class
|
||||
class_entry->info.internal.module = EG(current_module);
|
||||
|
||||
if (class_entry->info.internal.builtin_functions) {
|
||||
zend_register_functions(class_entry, class_entry->info.internal.builtin_functions, &class_entry->function_table, MODULE_PERSISTENT);
|
||||
zend_register_functions(class_entry, class_entry->info.internal.builtin_functions, &class_entry->function_table, EG(current_module)->type);
|
||||
}
|
||||
|
||||
lowercase_name = zend_string_tolower_ex(orig_class_entry->name, 1);
|
||||
lowercase_name = zend_string_tolower_ex(orig_class_entry->name, EG(current_module)->type == MODULE_PERSISTENT);
|
||||
lowercase_name = zend_new_interned_string(lowercase_name);
|
||||
zend_hash_update_ptr(CG(class_table), lowercase_name, class_entry);
|
||||
zend_string_release_ex(lowercase_name, 1);
|
||||
@@ -2786,6 +2786,11 @@ ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zen
|
||||
{
|
||||
zend_string *lcname;
|
||||
|
||||
/* TODO: Move this out of here in 7.4. */
|
||||
if (persistent && EG(current_module) && EG(current_module)->type == MODULE_TEMPORARY) {
|
||||
persistent = 0;
|
||||
}
|
||||
|
||||
if (name[0] == '\\') {
|
||||
lcname = zend_string_alloc(name_len-1, persistent);
|
||||
zend_str_tolower_copy(ZSTR_VAL(lcname), name+1, name_len-1);
|
||||
@@ -2843,7 +2848,7 @@ ZEND_API int zend_disable_function(char *function_name, size_t function_name_len
|
||||
{
|
||||
zend_internal_function *func;
|
||||
if ((func = zend_hash_str_find_ptr(CG(function_table), function_name, function_name_length))) {
|
||||
func->fn_flags &= ~(ZEND_ACC_VARIADIC | ZEND_ACC_HAS_TYPE_HINTS);
|
||||
func->fn_flags &= ~(ZEND_ACC_VARIADIC | ZEND_ACC_HAS_TYPE_HINTS | ZEND_ACC_HAS_RETURN_TYPE);
|
||||
func->num_args = 0;
|
||||
func->arg_info = NULL;
|
||||
func->handler = ZEND_FN(display_disabled_function);
|
||||
@@ -2861,6 +2866,17 @@ static zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{
|
||||
zend_object *intern;
|
||||
|
||||
intern = zend_objects_new(class_type);
|
||||
|
||||
/* Initialize default properties */
|
||||
if (EXPECTED(class_type->default_properties_count != 0)) {
|
||||
zval *p = intern->properties_table;
|
||||
zval *end = p + class_type->default_properties_count;
|
||||
do {
|
||||
ZVAL_UNDEF(p);
|
||||
p++;
|
||||
} while (p != end);
|
||||
}
|
||||
|
||||
zend_error(E_WARNING, "%s() has been disabled for security reasons", ZSTR_VAL(class_type->name));
|
||||
return intern;
|
||||
}
|
||||
@@ -3685,6 +3701,11 @@ static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */
|
||||
return Z_STR_P(zv);
|
||||
}
|
||||
|
||||
static zend_always_inline zend_bool is_persistent_class(zend_class_entry *ce) {
|
||||
return (ce->type & ZEND_INTERNAL_CLASS)
|
||||
&& ce->info.internal.module->type == MODULE_PERSISTENT;
|
||||
}
|
||||
|
||||
ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment) /* {{{ */
|
||||
{
|
||||
zend_property_info *property_info, *property_info_ptr;
|
||||
@@ -3750,10 +3771,10 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z
|
||||
if (access_type & ZEND_ACC_PUBLIC) {
|
||||
property_info->name = zend_string_copy(name);
|
||||
} else if (access_type & ZEND_ACC_PRIVATE) {
|
||||
property_info->name = zend_mangle_property_name(ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), ZSTR_VAL(name), ZSTR_LEN(name), ce->type & ZEND_INTERNAL_CLASS);
|
||||
property_info->name = zend_mangle_property_name(ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), ZSTR_VAL(name), ZSTR_LEN(name), is_persistent_class(ce));
|
||||
} else {
|
||||
ZEND_ASSERT(access_type & ZEND_ACC_PROTECTED);
|
||||
property_info->name = zend_mangle_property_name("*", 1, ZSTR_VAL(name), ZSTR_LEN(name), ce->type & ZEND_INTERNAL_CLASS);
|
||||
property_info->name = zend_mangle_property_name("*", 1, ZSTR_VAL(name), ZSTR_LEN(name), is_persistent_class(ce));
|
||||
}
|
||||
|
||||
property_info->name = zend_new_interned_string(property_info->name);
|
||||
@@ -3768,7 +3789,7 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z
|
||||
|
||||
ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type) /* {{{ */
|
||||
{
|
||||
zend_string *key = zend_string_init(name, name_length, ce->type & ZEND_INTERNAL_CLASS);
|
||||
zend_string *key = zend_string_init(name, name_length, is_persistent_class(ce));
|
||||
int ret = zend_declare_property_ex(ce, key, property, access_type, NULL);
|
||||
zend_string_release(key);
|
||||
return ret;
|
||||
|
||||
+25
-25
@@ -726,7 +726,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
char *_error = NULL; \
|
||||
zend_bool _dummy; \
|
||||
zend_bool _optional = 0; \
|
||||
int _error_code = ZPP_ERROR_OK; \
|
||||
int error_code = ZPP_ERROR_OK; \
|
||||
((void)_i); \
|
||||
((void)_real_arg); \
|
||||
((void)_arg); \
|
||||
@@ -746,7 +746,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
zend_wrong_parameters_count_error(_min_num_args, _max_num_args); \
|
||||
} \
|
||||
} \
|
||||
_error_code = ZPP_ERROR_FAILURE; \
|
||||
error_code = ZPP_ERROR_FAILURE; \
|
||||
break; \
|
||||
} \
|
||||
_i = 0; \
|
||||
@@ -764,21 +764,21 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
|
||||
#define ZEND_PARSE_PARAMETERS_END_EX(failure) \
|
||||
} while (0); \
|
||||
if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \
|
||||
if (UNEXPECTED(error_code != ZPP_ERROR_OK)) { \
|
||||
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
|
||||
if (_error_code == ZPP_ERROR_WRONG_CALLBACK) { \
|
||||
if (error_code == ZPP_ERROR_WRONG_CALLBACK) { \
|
||||
if (_flags & ZEND_PARSE_PARAMS_THROW) { \
|
||||
zend_wrong_callback_exception(_i, _error); \
|
||||
} else { \
|
||||
zend_wrong_callback_error(_i, _error); \
|
||||
} \
|
||||
} else if (_error_code == ZPP_ERROR_WRONG_CLASS) { \
|
||||
} else if (error_code == ZPP_ERROR_WRONG_CLASS) { \
|
||||
if (_flags & ZEND_PARSE_PARAMS_THROW) { \
|
||||
zend_wrong_parameter_class_exception(_i, _error, _arg); \
|
||||
} else { \
|
||||
zend_wrong_parameter_class_error(_i, _error, _arg); \
|
||||
} \
|
||||
} else if (_error_code == ZPP_ERROR_WRONG_ARG) { \
|
||||
} else if (error_code == ZPP_ERROR_WRONG_ARG) { \
|
||||
if (_flags & ZEND_PARSE_PARAMS_THROW) { \
|
||||
zend_wrong_parameter_type_exception(_i, _expected_type, _arg); \
|
||||
} else { \
|
||||
@@ -818,7 +818,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array(_arg, &dest, check_null, 0))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array(_arg, &dest, check_null, 1))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -848,7 +848,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_bool(_arg, &dest, &is_null, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_BOOL; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
#define Z_PARAM_CLASS_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_class(_arg, &dest, _i, check_null))) { \
|
||||
_error_code = ZPP_ERROR_FAILURE; \
|
||||
error_code = ZPP_ERROR_FAILURE; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -877,7 +877,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_double(_arg, &dest, &is_null, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_DOUBLE; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -893,10 +893,10 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
if (UNEXPECTED(!zend_parse_arg_func(_arg, &dest_fci, &dest_fcc, check_null, &_error))) { \
|
||||
if (!_error) { \
|
||||
_expected_type = Z_EXPECTED_FUNC; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
} else { \
|
||||
_error_code = ZPP_ERROR_WRONG_CALLBACK; \
|
||||
error_code = ZPP_ERROR_WRONG_CALLBACK; \
|
||||
break; \
|
||||
} \
|
||||
} else if (UNEXPECTED(_error != NULL)) { \
|
||||
@@ -914,7 +914,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 0, separate))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -929,7 +929,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 1, separate))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -944,7 +944,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null, 0))) { \
|
||||
_expected_type = Z_EXPECTED_LONG; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -959,7 +959,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null, 1))) { \
|
||||
_expected_type = Z_EXPECTED_LONG; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -974,7 +974,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, NULL, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_OBJECT; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -990,11 +990,11 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, _ce, check_null))) { \
|
||||
if (_ce) { \
|
||||
_error = ZSTR_VAL((_ce)->name); \
|
||||
_error_code = ZPP_ERROR_WRONG_CLASS; \
|
||||
error_code = ZPP_ERROR_WRONG_CLASS; \
|
||||
break; \
|
||||
} else { \
|
||||
_expected_type = Z_EXPECTED_OBJECT; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
} \
|
||||
}
|
||||
@@ -1010,7 +1010,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_path(_arg, &dest, &dest_len, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_PATH; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1025,7 +1025,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_path_str(_arg, &dest, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_PATH; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1040,7 +1040,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_resource(_arg, &dest, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_RESOURCE; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1055,7 +1055,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_string(_arg, &dest, &dest_len, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_STRING; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1070,7 +1070,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_str(_arg, &dest, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_STRING; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
|
||||
+19
-15
@@ -191,9 +191,7 @@ typedef struct _zend_mm_free_slot zend_mm_free_slot;
|
||||
typedef struct _zend_mm_chunk zend_mm_chunk;
|
||||
typedef struct _zend_mm_huge_list zend_mm_huge_list;
|
||||
|
||||
#ifdef MAP_HUGETLB
|
||||
int zend_mm_use_huge_pages = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Memory is retrived from OS by chunks of fixed size 2MB.
|
||||
@@ -714,7 +712,9 @@ static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
|
||||
return NULL;
|
||||
} else if (ZEND_MM_ALIGNED_OFFSET(ptr, alignment) == 0) {
|
||||
#ifdef MADV_HUGEPAGE
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
if (zend_mm_use_huge_pages) {
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
}
|
||||
#endif
|
||||
return ptr;
|
||||
} else {
|
||||
@@ -745,7 +745,9 @@ static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
|
||||
zend_mm_munmap((char*)ptr + size, alignment - REAL_PAGE_SIZE);
|
||||
}
|
||||
# ifdef MADV_HUGEPAGE
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
if (zend_mm_use_huge_pages) {
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
return ptr;
|
||||
@@ -980,7 +982,7 @@ get_chunk:
|
||||
heap->cached_chunks = chunk->next;
|
||||
} else {
|
||||
#if ZEND_MM_LIMIT
|
||||
if (UNEXPECTED(heap->real_size + ZEND_MM_CHUNK_SIZE > heap->limit)) {
|
||||
if (UNEXPECTED(ZEND_MM_CHUNK_SIZE > heap->limit - heap->real_size)) {
|
||||
if (zend_mm_gc(heap)) {
|
||||
goto get_chunk;
|
||||
} else if (heap->overflow == 0) {
|
||||
@@ -1508,8 +1510,8 @@ static zend_never_inline void *zend_mm_realloc_huge(zend_mm_heap *heap, void *pt
|
||||
}
|
||||
} else /* if (new_size > old_size) */ {
|
||||
#if ZEND_MM_LIMIT
|
||||
if (UNEXPECTED(heap->real_size + (new_size - old_size) > heap->limit)) {
|
||||
if (zend_mm_gc(heap) && heap->real_size + (new_size - old_size) <= heap->limit) {
|
||||
if (UNEXPECTED(new_size - old_size > heap->limit - heap->real_size)) {
|
||||
if (zend_mm_gc(heap) && new_size - old_size <= heap->limit - heap->real_size) {
|
||||
/* pass */
|
||||
} else if (heap->overflow == 0) {
|
||||
#if ZEND_DEBUG
|
||||
@@ -1790,15 +1792,20 @@ static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
|
||||
* We allocate them with 2MB size granularity, to avoid many
|
||||
* reallocations when they are extended by small pieces
|
||||
*/
|
||||
size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE));
|
||||
size_t alignment = MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE);
|
||||
#else
|
||||
size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, REAL_PAGE_SIZE);
|
||||
size_t alignment = REAL_PAGE_SIZE;
|
||||
#endif
|
||||
size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, alignment);
|
||||
void *ptr;
|
||||
|
||||
if (UNEXPECTED(new_size < size)) {
|
||||
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu + %zu)", size, alignment);
|
||||
}
|
||||
|
||||
#if ZEND_MM_LIMIT
|
||||
if (UNEXPECTED(heap->real_size + new_size > heap->limit)) {
|
||||
if (zend_mm_gc(heap) && heap->real_size + new_size <= heap->limit) {
|
||||
if (UNEXPECTED(new_size > heap->limit - heap->real_size)) {
|
||||
if (zend_mm_gc(heap) && new_size <= heap->limit - heap->real_size) {
|
||||
/* pass */
|
||||
} else if (heap->overflow == 0) {
|
||||
#if ZEND_DEBUG
|
||||
@@ -2668,9 +2675,7 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown)
|
||||
|
||||
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
{
|
||||
#if ZEND_MM_CUSTOM || MAP_HUGETLB
|
||||
char *tmp;
|
||||
#endif
|
||||
|
||||
#if ZEND_MM_CUSTOM
|
||||
tmp = getenv("USE_ZEND_ALLOC");
|
||||
@@ -2684,12 +2689,11 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef MAP_HUGETLB
|
||||
|
||||
tmp = getenv("USE_ZEND_ALLOC_HUGE_PAGES");
|
||||
if (tmp && zend_atoi(tmp, 0)) {
|
||||
zend_mm_use_huge_pages = 1;
|
||||
}
|
||||
#endif
|
||||
ZEND_TSRMLS_CACHE_UPDATE();
|
||||
alloc_globals->mm_heap = zend_mm_init();
|
||||
}
|
||||
|
||||
@@ -110,6 +110,17 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void *
|
||||
arena->ptr = (char*)checkpoint;
|
||||
}
|
||||
|
||||
static zend_always_inline zend_bool zend_arena_contains(zend_arena *arena, void *ptr)
|
||||
{
|
||||
while (arena) {
|
||||
if ((char*)ptr > (char*)arena && (char*)ptr <= arena->ptr) {
|
||||
return 1;
|
||||
}
|
||||
arena = arena->prev;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* _ZEND_ARENA_H_ */
|
||||
|
||||
/*
|
||||
|
||||
+9
-2
@@ -995,6 +995,11 @@ static ZEND_COLD int zend_ast_valid_var_name(const char *s, size_t len)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static ZEND_COLD int zend_ast_var_needs_braces(char ch)
|
||||
{
|
||||
return ch == '[' || zend_ast_valid_var_char(ch);
|
||||
}
|
||||
|
||||
static ZEND_COLD void zend_ast_export_var(smart_str *str, zend_ast *ast, int priority, int indent)
|
||||
{
|
||||
if (ast->kind == ZEND_AST_ZVAL) {
|
||||
@@ -1042,7 +1047,7 @@ static ZEND_COLD void zend_ast_export_encaps_list(smart_str *str, char quote, ze
|
||||
ast->child[0]->kind == ZEND_AST_ZVAL &&
|
||||
(i + 1 == list->children ||
|
||||
list->child[i + 1]->kind != ZEND_AST_ZVAL ||
|
||||
!zend_ast_valid_var_char(
|
||||
!zend_ast_var_needs_braces(
|
||||
*Z_STRVAL_P(
|
||||
zend_ast_get_zval(list->child[i + 1]))))) {
|
||||
zend_ast_export_ex(str, ast, 0, indent);
|
||||
@@ -1153,7 +1158,7 @@ tail_call:
|
||||
} else {
|
||||
zend_ast_export_indent(str, indent);
|
||||
smart_str_appends(str, "} else ");
|
||||
if (ast->child[1]->kind == ZEND_AST_IF) {
|
||||
if (ast->child[1] && ast->child[1]->kind == ZEND_AST_IF) {
|
||||
list = (zend_ast_list*)ast->child[1];
|
||||
goto tail_call;
|
||||
} else {
|
||||
@@ -1659,6 +1664,8 @@ simple_list:
|
||||
zend_ast_export_ex(str, ast->child[1], 80, indent);
|
||||
smart_str_appends(str, " => ");
|
||||
}
|
||||
if (ast->attr)
|
||||
smart_str_appendc(str, '&');
|
||||
zend_ast_export_ex(str, ast->child[0], 80, indent);
|
||||
break;
|
||||
case ZEND_AST_NEW:
|
||||
|
||||
+10
-2
@@ -200,7 +200,7 @@ ZEND_METHOD(Closure, bind)
|
||||
ce = closure->func.common.scope;
|
||||
} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {
|
||||
zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name));
|
||||
zend_string_release_ex(class_name, 0);
|
||||
zend_tmp_string_release(tmp_class_name);
|
||||
RETURN_NULL();
|
||||
}
|
||||
zend_tmp_string_release(tmp_class_name);
|
||||
@@ -268,8 +268,16 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
|
||||
|
||||
mptr = fcc.function_handler;
|
||||
if (mptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
|
||||
memset(&call, 0, sizeof(zend_internal_function));
|
||||
/* For Closure::fromCallable([$closure, "__invoke"]) return $closure. */
|
||||
if (fcc.object && fcc.object->ce == zend_ce_closure
|
||||
&& zend_string_equals_literal(mptr->common.function_name, "__invoke")) {
|
||||
ZVAL_OBJ(return_value, fcc.object);
|
||||
GC_ADDREF(fcc.object);
|
||||
zend_free_trampoline(mptr);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
memset(&call, 0, sizeof(zend_internal_function));
|
||||
call.type = ZEND_INTERNAL_FUNCTION;
|
||||
call.fn_flags = mptr->common.fn_flags & ZEND_ACC_STATIC;
|
||||
call.handler = zend_closure_call_magic;
|
||||
|
||||
+61
-18
@@ -1480,6 +1480,7 @@ static void zend_ensure_valid_class_fetch_type(uint32_t fetch_type) /* {{{ */
|
||||
static zend_bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_ast *class_ast, zend_ast *name_ast, zend_bool constant) /* {{{ */
|
||||
{
|
||||
uint32_t fetch_type;
|
||||
zval *class_name;
|
||||
|
||||
if (name_ast->kind != ZEND_AST_ZVAL) {
|
||||
return 0;
|
||||
@@ -1494,7 +1495,13 @@ static zend_bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_a
|
||||
"Dynamic class names are not allowed in compile-time ::class fetch");
|
||||
}
|
||||
|
||||
fetch_type = zend_get_class_fetch_type(zend_ast_get_str(class_ast));
|
||||
class_name = zend_ast_get_zval(class_ast);
|
||||
|
||||
if (Z_TYPE_P(class_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Illegal class name");
|
||||
}
|
||||
|
||||
fetch_type = zend_get_class_fetch_type(Z_STR_P(class_name));
|
||||
zend_ensure_valid_class_fetch_type(fetch_type);
|
||||
|
||||
switch (fetch_type) {
|
||||
@@ -1686,13 +1693,17 @@ ZEND_API void zend_activate_auto_globals(void) /* {{{ */
|
||||
int ZEND_FASTCALL zendlex(zend_parser_stack_elem *elem) /* {{{ */
|
||||
{
|
||||
zval zv;
|
||||
int ret;
|
||||
|
||||
if (CG(increment_lineno)) {
|
||||
CG(zend_lineno)++;
|
||||
CG(increment_lineno) = 0;
|
||||
}
|
||||
|
||||
return lex_scan(&zv, elem);
|
||||
ret = lex_scan(&zv, elem);
|
||||
ZEND_ASSERT(!EG(exception) || ret == T_ERROR);
|
||||
return ret;
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -3651,7 +3662,7 @@ int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcnam
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *name, zend_function *fbc) /* {{{ */
|
||||
static void zend_compile_assert(znode *result, zend_ast_list *args, zend_string *name, zend_function *fbc) /* {{{ */
|
||||
{
|
||||
if (EG(assertions) >= 0) {
|
||||
znode name_node;
|
||||
@@ -3694,8 +3705,6 @@ static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *
|
||||
result->op_type = IS_CONST;
|
||||
ZVAL_TRUE(&result->u.constant);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -3902,10 +3911,6 @@ int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_l
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (zend_string_equals_literal(lcname, "assert")) {
|
||||
return zend_compile_assert(result, args, lcname, fbc);
|
||||
}
|
||||
|
||||
if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) {
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -4008,8 +4013,16 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
|
||||
zend_op *opline;
|
||||
|
||||
lcname = zend_string_tolower(Z_STR_P(name));
|
||||
|
||||
fbc = zend_hash_find_ptr(CG(function_table), lcname);
|
||||
|
||||
/* Special assert() handling should apply independently of compiler flags. */
|
||||
if (fbc && zend_string_equals_literal(lcname, "assert")) {
|
||||
zend_compile_assert(result, zend_ast_get_list(args_ast), lcname, fbc);
|
||||
zend_string_release(lcname);
|
||||
zval_ptr_dtor(&name_node.u.constant);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fbc
|
||||
|| (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
|
||||
|| (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS))
|
||||
@@ -4519,7 +4532,7 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
|
||||
zend_ast *depth_ast = ast->child[0];
|
||||
|
||||
zend_op *opline;
|
||||
int depth;
|
||||
zend_long depth;
|
||||
|
||||
ZEND_ASSERT(ast->kind == ZEND_AST_BREAK || ast->kind == ZEND_AST_CONTINUE);
|
||||
|
||||
@@ -4546,7 +4559,7 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
|
||||
ast->kind == ZEND_AST_BREAK ? "break" : "continue");
|
||||
} else {
|
||||
if (!zend_handle_loops_and_finally_ex(depth, NULL)) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Cannot '%s' %d level%s",
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Cannot '%s' " ZEND_LONG_FMT " level%s",
|
||||
ast->kind == ZEND_AST_BREAK ? "break" : "continue",
|
||||
depth, depth == 1 ? "" : "s");
|
||||
}
|
||||
@@ -4563,12 +4576,12 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
|
||||
if (depth == 1) {
|
||||
zend_error(E_WARNING,
|
||||
"\"continue\" targeting switch is equivalent to \"break\". " \
|
||||
"Did you mean to use \"continue %d\"?",
|
||||
"Did you mean to use \"continue " ZEND_LONG_FMT "\"?",
|
||||
depth + 1);
|
||||
} else {
|
||||
zend_error(E_WARNING,
|
||||
"\"continue %d\" targeting switch is equivalent to \"break %d\". " \
|
||||
"Did you mean to use \"continue %d\"?",
|
||||
"\"continue " ZEND_LONG_FMT "\" targeting switch is equivalent to \"break " ZEND_LONG_FMT "\". " \
|
||||
"Did you mean to use \"continue " ZEND_LONG_FMT "\"?",
|
||||
depth, depth, depth + 1);
|
||||
}
|
||||
}
|
||||
@@ -4956,6 +4969,10 @@ static zend_uchar determine_switch_jumptable_type(zend_ast_list *cases) {
|
||||
}
|
||||
|
||||
static zend_bool should_use_jumptable(zend_ast_list *cases, zend_uchar jumptable_type) {
|
||||
if (CG(compiler_options) & ZEND_COMPILE_NO_JUMPTABLES) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Thresholds are chosen based on when the average switch time for equidistributed
|
||||
* input becomes smaller when using the jumptable optimization. */
|
||||
if (jumptable_type == IS_LONG) {
|
||||
@@ -6427,10 +6444,32 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
|
||||
if (!zend_hash_exists(CG(class_table), lcname)) {
|
||||
zend_hash_add_ptr(CG(class_table), lcname, ce);
|
||||
} else {
|
||||
/* this anonymous class has been included */
|
||||
/* This anonymous class has been included, reuse the existing definition.
|
||||
* NB: This behavior is buggy, and this should always result in a separate
|
||||
* class declaration. However, until the problem of RTD key collisions is
|
||||
* solved, this gives a behavior close to what is expected. */
|
||||
zval zv;
|
||||
ZVAL_PTR(&zv, ce);
|
||||
destroy_zend_class(&zv);
|
||||
ce = zend_hash_find_ptr(CG(class_table), lcname);
|
||||
|
||||
/* Manually replicate emission of necessary inheritance opcodes here. We cannot
|
||||
* reuse the general code, as we only want to emit the opcodes, without modifying
|
||||
* the reused class definition. */
|
||||
if (ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS) {
|
||||
zend_emit_op(NULL, ZEND_BIND_TRAITS, &declare_node, NULL);
|
||||
}
|
||||
if (implements_ast) {
|
||||
zend_ast_list *iface_list = zend_ast_get_list(implements_ast);
|
||||
uint32_t i;
|
||||
for (i = 0; i < iface_list->children; i++) {
|
||||
opline = zend_emit_op(NULL, ZEND_ADD_INTERFACE, &declare_node, NULL);
|
||||
opline->op2_type = IS_CONST;
|
||||
opline->op2.constant = zend_add_class_name_literal(CG(active_op_array),
|
||||
zend_resolve_class_name_ast(iface_list->child[i]));
|
||||
}
|
||||
zend_emit_op(NULL, ZEND_VERIFY_ABSTRACT_CLASS, &declare_node, NULL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -6659,6 +6698,7 @@ void zend_compile_use(zend_ast *ast) /* {{{ */
|
||||
}
|
||||
|
||||
zend_string_addref(old_name);
|
||||
old_name = zend_new_interned_string(old_name);
|
||||
if (!zend_hash_add_ptr(current_import, lookup_name, old_name)) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use%s %s as %s because the name "
|
||||
"is already in use", zend_get_use_type_str(type), ZSTR_VAL(old_name), ZSTR_VAL(new_name));
|
||||
@@ -7726,11 +7766,14 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */
|
||||
if (zend_string_equals_literal(resolved_name, "__COMPILER_HALT_OFFSET__") || (name_ast->attr != ZEND_NAME_RELATIVE && zend_string_equals_literal(orig_name, "__COMPILER_HALT_OFFSET__"))) {
|
||||
zend_ast *last = CG(ast);
|
||||
|
||||
while (last->kind == ZEND_AST_STMT_LIST) {
|
||||
while (last && last->kind == ZEND_AST_STMT_LIST) {
|
||||
zend_ast_list *list = zend_ast_get_list(last);
|
||||
if (list->children == 0) {
|
||||
break;
|
||||
}
|
||||
last = list->child[list->children-1];
|
||||
}
|
||||
if (last->kind == ZEND_AST_HALT_COMPILER) {
|
||||
if (last && last->kind == ZEND_AST_HALT_COMPILER) {
|
||||
result->op_type = IS_CONST;
|
||||
ZVAL_LONG(&result->u.constant, Z_LVAL_P(zend_ast_get_zval(last->child[0])));
|
||||
zend_string_release_ex(resolved_name, 0);
|
||||
|
||||
@@ -1048,6 +1048,9 @@ END_EXTERN_C()
|
||||
/* result of compilation may be stored in file cache */
|
||||
#define ZEND_COMPILE_WITH_FILE_CACHE (1<<11)
|
||||
|
||||
/* disable jumptable optimization for switch statements */
|
||||
#define ZEND_COMPILE_NO_JUMPTABLES (1<<12)
|
||||
|
||||
/* The default value for CG(compiler_options) */
|
||||
#define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY
|
||||
|
||||
|
||||
@@ -378,7 +378,9 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
|
||||
ret_constant = NULL;
|
||||
} else {
|
||||
if (!zend_verify_const_access(c, scope)) {
|
||||
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
|
||||
if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) {
|
||||
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
|
||||
}
|
||||
goto failure;
|
||||
}
|
||||
ret_constant = &c->value;
|
||||
|
||||
+24
-12
@@ -400,11 +400,13 @@ ZEND_METHOD(error_exception, __construct)
|
||||
Get the file in which the exception occurred */
|
||||
ZEND_METHOD(exception, getFile)
|
||||
{
|
||||
zval rv;
|
||||
zval *prop, rv;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_FILE));
|
||||
prop = GET_PROPERTY(getThis(), ZEND_STR_FILE);
|
||||
ZVAL_DEREF(prop);
|
||||
ZVAL_COPY(return_value, prop);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -412,11 +414,13 @@ ZEND_METHOD(exception, getFile)
|
||||
Get the line in which the exception occurred */
|
||||
ZEND_METHOD(exception, getLine)
|
||||
{
|
||||
zval rv;
|
||||
zval *prop, rv;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_LINE));
|
||||
prop = GET_PROPERTY(getThis(), ZEND_STR_LINE);
|
||||
ZVAL_DEREF(prop);
|
||||
ZVAL_COPY(return_value, prop);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -424,11 +428,13 @@ ZEND_METHOD(exception, getLine)
|
||||
Get the exception message */
|
||||
ZEND_METHOD(exception, getMessage)
|
||||
{
|
||||
zval rv;
|
||||
zval *prop, rv;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_MESSAGE));
|
||||
prop = GET_PROPERTY(getThis(), ZEND_STR_MESSAGE);
|
||||
ZVAL_DEREF(prop);
|
||||
ZVAL_COPY(return_value, prop);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -436,11 +442,13 @@ ZEND_METHOD(exception, getMessage)
|
||||
Get the exception code */
|
||||
ZEND_METHOD(exception, getCode)
|
||||
{
|
||||
zval rv;
|
||||
zval *prop, rv;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_CODE));
|
||||
prop = GET_PROPERTY(getThis(), ZEND_STR_CODE);
|
||||
ZVAL_DEREF(prop);
|
||||
ZVAL_COPY(return_value, prop);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -448,11 +456,13 @@ ZEND_METHOD(exception, getCode)
|
||||
Get the stack trace for the location in which the exception occurred */
|
||||
ZEND_METHOD(exception, getTrace)
|
||||
{
|
||||
zval rv;
|
||||
zval *prop, rv;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_TRACE));
|
||||
prop = GET_PROPERTY(getThis(), ZEND_STR_TRACE);
|
||||
ZVAL_DEREF(prop);
|
||||
ZVAL_COPY(return_value, prop);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -460,11 +470,13 @@ ZEND_METHOD(exception, getTrace)
|
||||
Get the exception severity */
|
||||
ZEND_METHOD(error_exception, getSeverity)
|
||||
{
|
||||
zval rv;
|
||||
zval *prop, rv;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_SEVERITY));
|
||||
prop = GET_PROPERTY(getThis(), ZEND_STR_SEVERITY);
|
||||
ZVAL_DEREF(prop);
|
||||
ZVAL_COPY(return_value, prop);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+303
-121
@@ -48,7 +48,7 @@
|
||||
* gc_scan_roots will be called, and each root will be called with
|
||||
* gc_scan(root->ref)
|
||||
*
|
||||
* gc_scan checkes the colors of possible members.
|
||||
* gc_scan checks the colors of possible members.
|
||||
*
|
||||
* If the node is marked as grey and the refcount > 0
|
||||
* gc_scan_black will be called on that node to scan it's subgraph.
|
||||
@@ -86,6 +86,22 @@
|
||||
#define GC_GREY 0x200000
|
||||
#define GC_PURPLE 0x300000
|
||||
|
||||
/* Debug tracing */
|
||||
#if ZEND_GC_DEBUG > 1
|
||||
# define GC_TRACE(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__);
|
||||
# define GC_TRACE_REF(ref, format, ...) \
|
||||
do { \
|
||||
gc_trace_ref((zend_refcounted *) ref); \
|
||||
fprintf(stderr, format "\n", ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
# define GC_TRACE_SET_COLOR(ref, color) \
|
||||
GC_TRACE_REF(ref, "->%s", gc_color_name(color))
|
||||
#else
|
||||
# define GC_TRACE_REF(ref, format, ...)
|
||||
# define GC_TRACE_SET_COLOR(ref, new_color)
|
||||
# define GC_TRACE(str)
|
||||
#endif
|
||||
|
||||
/* GC_INFO access */
|
||||
#define GC_REF_ADDRESS(ref) \
|
||||
(((GC_TYPE_INFO(ref)) & (GC_ADDRESS << GC_INFO_SHIFT)) >> GC_INFO_SHIFT)
|
||||
@@ -103,16 +119,19 @@
|
||||
} while (0)
|
||||
|
||||
#define GC_REF_SET_COLOR(ref, c) do { \
|
||||
GC_TRACE_SET_COLOR(ref, c); \
|
||||
GC_TYPE_INFO(ref) = \
|
||||
(GC_TYPE_INFO(ref) & ~(GC_COLOR << GC_INFO_SHIFT)) | \
|
||||
((c) << GC_INFO_SHIFT); \
|
||||
} while (0)
|
||||
|
||||
#define GC_REF_SET_BLACK(ref) do { \
|
||||
GC_TRACE_SET_COLOR(ref, GC_BLACK); \
|
||||
GC_TYPE_INFO(ref) &= ~(GC_COLOR << GC_INFO_SHIFT); \
|
||||
} while (0)
|
||||
|
||||
#define GC_REF_SET_PURPLE(ref) do { \
|
||||
GC_TRACE_SET_COLOR(ref, GC_PURPLE); \
|
||||
GC_TYPE_INFO(ref) |= (GC_COLOR << GC_INFO_SHIFT); \
|
||||
} while (0)
|
||||
|
||||
@@ -150,7 +169,7 @@
|
||||
#define GC_DEFAULT_BUF_SIZE (16 * 1024)
|
||||
#define GC_BUF_GROW_STEP (128 * 1024)
|
||||
|
||||
#define GC_MAX_UNCOMPRESSED (1024 * 1024)
|
||||
#define GC_MAX_UNCOMPRESSED (512 * 1024)
|
||||
#define GC_MAX_BUF_SIZE 0x40000000
|
||||
|
||||
#define GC_THRESHOLD_DEFAULT 10000
|
||||
@@ -230,24 +249,79 @@ static zend_gc_globals gc_globals;
|
||||
# define GC_BENCH_PEAK(peak, counter)
|
||||
#endif
|
||||
|
||||
#if ZEND_GC_DEBUG > 1
|
||||
# define GC_TRACE(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__);
|
||||
# define GC_TRACE_REF(ref, format, ...) \
|
||||
do { \
|
||||
gc_trace_ref((zend_refcounted *) ref); \
|
||||
fprintf(stderr, format "\n", ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
# define GC_TRACE_SET_COLOR(ref, color) \
|
||||
GC_TRACE_REF(ref, "->%s", gc_color_name(color))
|
||||
#else
|
||||
# define GC_TRACE_REF(ref, format, ...)
|
||||
# define GC_TRACE_SET_COLOR(ref, new_color)
|
||||
# define GC_TRACE(str)
|
||||
#endif
|
||||
|
||||
#define GC_STACK_SEGMENT_SIZE (((4096 - ZEND_MM_OVERHEAD) / sizeof(void*)) - 2)
|
||||
|
||||
typedef struct _gc_stack gc_stack;
|
||||
|
||||
struct _gc_stack {
|
||||
gc_stack *prev;
|
||||
gc_stack *next;
|
||||
zend_refcounted *data[GC_STACK_SEGMENT_SIZE];
|
||||
};
|
||||
|
||||
#define GC_STACK_DCL(init) \
|
||||
gc_stack *_stack = init; \
|
||||
size_t _top = 0;
|
||||
|
||||
#define GC_STACK_PUSH(ref) \
|
||||
gc_stack_push(&_stack, &_top, ref);
|
||||
|
||||
#define GC_STACK_POP() \
|
||||
gc_stack_pop(&_stack, &_top)
|
||||
|
||||
static zend_never_inline gc_stack* gc_stack_next(gc_stack *stack)
|
||||
{
|
||||
if (UNEXPECTED(!stack->next)) {
|
||||
gc_stack *segment = emalloc(sizeof(gc_stack));
|
||||
segment->prev = stack;
|
||||
segment->next = NULL;
|
||||
stack->next = segment;
|
||||
}
|
||||
return stack->next;
|
||||
}
|
||||
|
||||
static zend_always_inline void gc_stack_push(gc_stack **stack, size_t *top, zend_refcounted *ref)
|
||||
{
|
||||
if (UNEXPECTED(*top == GC_STACK_SEGMENT_SIZE)) {
|
||||
(*stack) = gc_stack_next(*stack);
|
||||
(*top) = 0;
|
||||
}
|
||||
(*stack)->data[(*top)++] = ref;
|
||||
}
|
||||
|
||||
static zend_always_inline zend_refcounted* gc_stack_pop(gc_stack **stack, size_t *top)
|
||||
{
|
||||
if (UNEXPECTED((*top) == 0)) {
|
||||
if (!(*stack)->prev) {
|
||||
return NULL;
|
||||
} else {
|
||||
(*stack) = (*stack)->prev;
|
||||
(*top) = GC_STACK_SEGMENT_SIZE - 1;
|
||||
return (*stack)->data[GC_STACK_SEGMENT_SIZE - 1];
|
||||
}
|
||||
} else {
|
||||
return (*stack)->data[--(*top)];
|
||||
}
|
||||
}
|
||||
|
||||
static void gc_stack_free(gc_stack *stack)
|
||||
{
|
||||
gc_stack *p = stack->next;
|
||||
|
||||
while (p) {
|
||||
stack = p->next;
|
||||
efree(p);
|
||||
p = stack;
|
||||
}
|
||||
}
|
||||
|
||||
static zend_always_inline uint32_t gc_compress(uint32_t idx)
|
||||
{
|
||||
return idx % GC_MAX_UNCOMPRESSED;
|
||||
if (EXPECTED(idx < GC_MAX_UNCOMPRESSED)) {
|
||||
return idx;
|
||||
}
|
||||
return (idx % GC_MAX_UNCOMPRESSED) | GC_MAX_UNCOMPRESSED;
|
||||
}
|
||||
|
||||
static zend_always_inline gc_root_buffer* gc_decompress(zend_refcounted *ref, uint32_t idx)
|
||||
@@ -606,16 +680,14 @@ ZEND_API void ZEND_FASTCALL gc_remove_from_buffer(zend_refcounted *ref)
|
||||
gc_remove_from_roots(root);
|
||||
}
|
||||
|
||||
static void gc_scan_black(zend_refcounted *ref)
|
||||
static void gc_scan_black(zend_refcounted *ref, gc_stack *stack)
|
||||
{
|
||||
HashTable *ht;
|
||||
HashTable *ht = NULL;
|
||||
Bucket *p, *end;
|
||||
zval *zv;
|
||||
GC_STACK_DCL(stack);
|
||||
|
||||
tail_call:
|
||||
ht = NULL;
|
||||
GC_REF_SET_BLACK(ref);
|
||||
|
||||
if (GC_TYPE(ref) == IS_OBJECT) {
|
||||
zend_object_get_gc_t get_gc;
|
||||
zend_object *obj = (zend_object*)ref;
|
||||
@@ -629,18 +701,22 @@ tail_call:
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (!n) return;
|
||||
if (EXPECTED(!ht) || UNEXPECTED(GC_REF_CHECK_COLOR(ht, GC_BLACK))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
if (zv == end) return;
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_BLACK(ht);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
gc_scan_black(ref);
|
||||
GC_REF_SET_BLACK(ref);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
}
|
||||
zv++;
|
||||
@@ -649,33 +725,35 @@ tail_call:
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
goto tail_call;
|
||||
}
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_ARRAY) {
|
||||
if ((zend_array*)ref != &EG(symbol_table)) {
|
||||
ht = (zend_array*)ref;
|
||||
} else {
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
GC_ADDREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
goto tail_call;
|
||||
}
|
||||
}
|
||||
return;
|
||||
goto next;
|
||||
} else {
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (!ht->nNumUsed) return;
|
||||
if (!ht->nNumUsed) goto next;
|
||||
p = ht->arData;
|
||||
end = p + ht->nNumUsed;
|
||||
while (1) {
|
||||
@@ -687,7 +765,7 @@ tail_call:
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
break;
|
||||
}
|
||||
if (p == end) return;
|
||||
if (p == end) goto next;
|
||||
}
|
||||
while (p != end) {
|
||||
zv = &p->val;
|
||||
@@ -698,7 +776,8 @@ tail_call:
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
gc_scan_black(ref);
|
||||
GC_REF_SET_BLACK(ref);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
}
|
||||
p++;
|
||||
@@ -710,28 +789,33 @@ tail_call:
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
goto tail_call;
|
||||
}
|
||||
|
||||
next:
|
||||
ref = GC_STACK_POP();
|
||||
if (ref) {
|
||||
goto tail_call;
|
||||
}
|
||||
}
|
||||
|
||||
static void gc_mark_grey(zend_refcounted *ref)
|
||||
static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
|
||||
{
|
||||
HashTable *ht;
|
||||
HashTable *ht = NULL;
|
||||
Bucket *p, *end;
|
||||
zval *zv;
|
||||
GC_STACK_DCL(stack);
|
||||
|
||||
tail_call:
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
ht = NULL;
|
||||
do {
|
||||
GC_BENCH_INC(zval_marked_grey);
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
|
||||
if (GC_TYPE(ref) == IS_OBJECT) {
|
||||
zend_object_get_gc_t get_gc;
|
||||
zend_object *obj = (zend_object*)ref;
|
||||
|
||||
if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
|
||||
(get_gc = obj->handlers->get_gc) != NULL)) {
|
||||
(get_gc = obj->handlers->get_gc) != NULL)) {
|
||||
int n;
|
||||
zval *zv, *end;
|
||||
zval tmp;
|
||||
@@ -739,47 +823,63 @@ tail_call:
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (!n) return;
|
||||
if (EXPECTED(!ht) || UNEXPECTED(GC_REF_CHECK_COLOR(ht, GC_GREY))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
if (zv == end) return;
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_COLOR(ht, GC_GREY);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
gc_mark_grey(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
}
|
||||
zv++;
|
||||
}
|
||||
if (EXPECTED(!ht)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
goto tail_call;
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
continue;
|
||||
}
|
||||
goto next;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_ARRAY) {
|
||||
if (((zend_array*)ref) == &EG(symbol_table)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
return;
|
||||
goto next;
|
||||
} else {
|
||||
ht = (zend_array*)ref;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
goto tail_call;
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return;
|
||||
goto next;
|
||||
} else {
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (!ht->nNumUsed) return;
|
||||
if (!ht->nNumUsed) goto next;
|
||||
p = ht->arData;
|
||||
end = p + ht->nNumUsed;
|
||||
while (1) {
|
||||
@@ -791,7 +891,7 @@ tail_call:
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
break;
|
||||
}
|
||||
if (p == end) return;
|
||||
if (p == end) goto next;
|
||||
}
|
||||
while (p != end) {
|
||||
zv = &p->val;
|
||||
@@ -800,8 +900,12 @@ tail_call:
|
||||
}
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
gc_mark_grey(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
}
|
||||
p++;
|
||||
}
|
||||
@@ -810,9 +914,16 @@ tail_call:
|
||||
zv = Z_INDIRECT_P(zv);
|
||||
}
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
goto tail_call;
|
||||
}
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
continue;
|
||||
}
|
||||
|
||||
next:
|
||||
ref = GC_STACK_POP();
|
||||
} while (ref);
|
||||
}
|
||||
|
||||
/* Two-Finger compaction algorithm */
|
||||
@@ -852,7 +963,7 @@ static void gc_compact(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void gc_mark_roots(void)
|
||||
static void gc_mark_roots(gc_stack *stack)
|
||||
{
|
||||
gc_root_buffer *current, *last;
|
||||
|
||||
@@ -863,31 +974,41 @@ static void gc_mark_roots(void)
|
||||
while (current != last) {
|
||||
if (GC_IS_ROOT(current->ref)) {
|
||||
if (GC_REF_CHECK_COLOR(current->ref, GC_PURPLE)) {
|
||||
gc_mark_grey(current->ref);
|
||||
GC_REF_SET_COLOR(current->ref, GC_GREY);
|
||||
gc_mark_grey(current->ref, stack);
|
||||
}
|
||||
}
|
||||
current++;
|
||||
}
|
||||
}
|
||||
|
||||
static void gc_scan(zend_refcounted *ref)
|
||||
static void gc_scan(zend_refcounted *ref, gc_stack *stack)
|
||||
{
|
||||
HashTable *ht;
|
||||
HashTable *ht = NULL;
|
||||
Bucket *p, *end;
|
||||
zval *zv;
|
||||
GC_STACK_DCL(stack);
|
||||
|
||||
tail_call:
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
if (GC_REFCOUNT(ref) > 0) {
|
||||
gc_scan_black(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
if (UNEXPECTED(!_stack->next)) {
|
||||
gc_stack_next(_stack);
|
||||
}
|
||||
/* Split stack and reuse the tail */
|
||||
_stack->next->prev = NULL;
|
||||
gc_scan_black(ref, _stack->next);
|
||||
_stack->next->prev = _stack;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_COLOR(ref, GC_WHITE);
|
||||
if (GC_TYPE(ref) == IS_OBJECT) {
|
||||
zend_object_get_gc_t get_gc;
|
||||
zend_object *obj = (zend_object*)ref;
|
||||
|
||||
if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
|
||||
(get_gc = obj->handlers->get_gc) != NULL)) {
|
||||
(get_gc = obj->handlers->get_gc) != NULL)) {
|
||||
int n;
|
||||
zval *zv, *end;
|
||||
zval tmp;
|
||||
@@ -895,44 +1016,57 @@ tail_call:
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (!n) return;
|
||||
if (EXPECTED(!ht) || UNEXPECTED(!GC_REF_CHECK_COLOR(ht, GC_GREY))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
if (zv == end) return;
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_COLOR(ht, GC_WHITE);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
gc_scan(ref);
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_WHITE);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
}
|
||||
zv++;
|
||||
}
|
||||
if (EXPECTED(!ht)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
goto tail_call;
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_WHITE);
|
||||
goto tail_call;
|
||||
}
|
||||
goto next;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_ARRAY) {
|
||||
if ((zend_array*)ref == &EG(symbol_table)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
return;
|
||||
goto next;
|
||||
} else {
|
||||
ht = (zend_array*)ref;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
goto tail_call;
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_WHITE);
|
||||
goto tail_call;
|
||||
}
|
||||
}
|
||||
return;
|
||||
goto next;
|
||||
} else {
|
||||
return;
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (!ht->nNumUsed) return;
|
||||
if (!ht->nNumUsed) goto next;
|
||||
p = ht->arData;
|
||||
end = p + ht->nNumUsed;
|
||||
while (1) {
|
||||
@@ -944,7 +1078,7 @@ tail_call:
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
break;
|
||||
}
|
||||
if (p == end) return;
|
||||
if (p == end) goto next;
|
||||
}
|
||||
while (p != end) {
|
||||
zv = &p->val;
|
||||
@@ -953,7 +1087,10 @@ tail_call:
|
||||
}
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
gc_scan(ref);
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_WHITE);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
}
|
||||
p++;
|
||||
}
|
||||
@@ -962,19 +1099,31 @@ tail_call:
|
||||
zv = Z_INDIRECT_P(zv);
|
||||
}
|
||||
ref = Z_COUNTED_P(zv);
|
||||
goto tail_call;
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_WHITE);
|
||||
goto tail_call;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
next:
|
||||
ref = GC_STACK_POP();
|
||||
if (ref) {
|
||||
goto tail_call;
|
||||
}
|
||||
}
|
||||
|
||||
static void gc_scan_roots(void)
|
||||
static void gc_scan_roots(gc_stack *stack)
|
||||
{
|
||||
gc_root_buffer *current = GC_IDX2PTR(GC_FIRST_ROOT);
|
||||
gc_root_buffer *last = GC_IDX2PTR(GC_G(first_unused));
|
||||
|
||||
while (current != last) {
|
||||
if (GC_IS_ROOT(current->ref)) {
|
||||
gc_scan(current->ref);
|
||||
if (GC_REF_CHECK_COLOR(current->ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(current->ref, GC_WHITE);
|
||||
gc_scan(current->ref, stack);
|
||||
}
|
||||
}
|
||||
current++;
|
||||
}
|
||||
@@ -1005,18 +1154,15 @@ static void gc_add_garbage(zend_refcounted *ref)
|
||||
GC_G(num_roots)++;
|
||||
}
|
||||
|
||||
static int gc_collect_white(zend_refcounted *ref, uint32_t *flags)
|
||||
static int gc_collect_white(zend_refcounted *ref, uint32_t *flags, gc_stack *stack)
|
||||
{
|
||||
int count = 0;
|
||||
HashTable *ht;
|
||||
HashTable *ht = NULL;
|
||||
Bucket *p, *end;
|
||||
zval *zv;
|
||||
GC_STACK_DCL(stack);
|
||||
|
||||
tail_call:
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
ht = NULL;
|
||||
GC_REF_SET_BLACK(ref);
|
||||
|
||||
do {
|
||||
/* don't count references for compatibility ??? */
|
||||
if (GC_TYPE(ref) != IS_REFERENCE) {
|
||||
count++;
|
||||
@@ -1027,7 +1173,7 @@ tail_call:
|
||||
zend_object *obj = (zend_object*)ref;
|
||||
|
||||
if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
|
||||
(get_gc = obj->handlers->get_gc) != NULL)) {
|
||||
(get_gc = obj->handlers->get_gc) != NULL)) {
|
||||
int n;
|
||||
zval *zv, *end;
|
||||
zval tmp;
|
||||
@@ -1037,28 +1183,34 @@ tail_call:
|
||||
gc_add_garbage(ref);
|
||||
}
|
||||
if (obj->handlers->dtor_obj &&
|
||||
((obj->handlers->dtor_obj != zend_objects_destroy_object) ||
|
||||
(obj->ce->destructor != NULL))) {
|
||||
((obj->handlers->dtor_obj != zend_objects_destroy_object) ||
|
||||
(obj->ce->destructor != NULL))) {
|
||||
*flags |= GC_HAS_DESTRUCTORS;
|
||||
}
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (!n) return count;
|
||||
if (EXPECTED(!ht) || UNEXPECTED(GC_REF_CHECK_COLOR(ht, GC_BLACK))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
/* count non-refcounted for compatibility ??? */
|
||||
if (Z_TYPE_P(zv) != IS_UNDEF) {
|
||||
count++;
|
||||
}
|
||||
if (zv == end) return count;
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_BLACK(ht);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
count += gc_collect_white(ref, flags);
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
/* count non-refcounted for compatibility ??? */
|
||||
} else if (Z_TYPE_P(zv) != IS_UNDEF) {
|
||||
count++;
|
||||
@@ -1068,10 +1220,14 @@ tail_call:
|
||||
if (EXPECTED(!ht)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
goto tail_call;
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
continue;
|
||||
}
|
||||
goto next;
|
||||
}
|
||||
} else {
|
||||
return count;
|
||||
goto next;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_ARRAY) {
|
||||
/* optimization: color is GC_BLACK (0) */
|
||||
@@ -1083,14 +1239,17 @@ tail_call:
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
GC_ADDREF(ref);
|
||||
goto tail_call;
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
goto next;
|
||||
} else {
|
||||
return count;
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (!ht->nNumUsed) return count;
|
||||
if (!ht->nNumUsed) goto next;
|
||||
p = ht->arData;
|
||||
end = p + ht->nNumUsed;
|
||||
while (1) {
|
||||
@@ -1106,7 +1265,7 @@ tail_call:
|
||||
if (Z_TYPE_P(zv) != IS_UNDEF) {
|
||||
count++;
|
||||
}
|
||||
if (p == end) return count;
|
||||
if (p == end) goto next;
|
||||
}
|
||||
while (p != end) {
|
||||
zv = &p->val;
|
||||
@@ -1116,7 +1275,10 @@ tail_call:
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
count += gc_collect_white(ref, flags);
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
GC_STACK_PUSH(ref);
|
||||
}
|
||||
/* count non-refcounted for compatibility ??? */
|
||||
} else if (Z_TYPE_P(zv) != IS_UNDEF) {
|
||||
count++;
|
||||
@@ -1129,12 +1291,19 @@ tail_call:
|
||||
}
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_ADDREF(ref);
|
||||
goto tail_call;
|
||||
}
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
GC_REF_SET_BLACK(ref);
|
||||
continue;
|
||||
}
|
||||
|
||||
next:
|
||||
ref = GC_STACK_POP();
|
||||
} while (ref);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static int gc_collect_roots(uint32_t *flags)
|
||||
static int gc_collect_roots(uint32_t *flags, gc_stack *stack)
|
||||
{
|
||||
uint32_t idx, end;
|
||||
zend_refcounted *ref;
|
||||
@@ -1165,7 +1334,8 @@ static int gc_collect_roots(uint32_t *flags)
|
||||
ZEND_ASSERT(GC_IS_ROOT(ref));
|
||||
current->ref = GC_MAKE_GARBAGE(ref);
|
||||
if (GC_REF_CHECK_COLOR(ref, GC_WHITE)) {
|
||||
count += gc_collect_white(ref, flags);
|
||||
GC_REF_SET_BLACK(ref);
|
||||
count += gc_collect_white(ref, flags, stack);
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
@@ -1180,16 +1350,24 @@ static void gc_remove_nested_data_from_buffer(zend_refcounted *ref, gc_root_buff
|
||||
zval *zv;
|
||||
|
||||
tail_call:
|
||||
if (root ||
|
||||
(GC_REF_ADDRESS(ref) != 0 &&
|
||||
GC_REF_CHECK_COLOR(ref, GC_BLACK))) {
|
||||
GC_TRACE_REF(ref, "removing from buffer");
|
||||
do {
|
||||
if (root) {
|
||||
GC_TRACE_REF(ref, "removing from buffer");
|
||||
gc_remove_from_roots(root);
|
||||
GC_REF_SET_INFO(ref, 0);
|
||||
root = NULL;
|
||||
} else {
|
||||
} else if (GC_REF_ADDRESS(ref) != 0
|
||||
&& GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
GC_TRACE_REF(ref, "removing from buffer");
|
||||
GC_REMOVE_FROM_BUFFER(ref);
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
goto tail_call;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (GC_TYPE(ref) == IS_OBJECT) {
|
||||
@@ -1222,17 +1400,15 @@ tail_call:
|
||||
ref = Z_COUNTED_P(zv);
|
||||
goto tail_call;
|
||||
}
|
||||
if (GC_REF_ADDRESS(ht) != 0 && GC_REF_CHECK_COLOR(ht, GC_BLACK)) {
|
||||
GC_TRACE_REF(ht, "removing from buffer");
|
||||
GC_REMOVE_FROM_BUFFER(ht);
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_ARRAY) {
|
||||
ht = (zend_array*)ref;
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
goto tail_call;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -1268,7 +1444,7 @@ tail_call:
|
||||
}
|
||||
ref = Z_COUNTED_P(zv);
|
||||
goto tail_call;
|
||||
}
|
||||
} while (0);
|
||||
}
|
||||
|
||||
ZEND_API int zend_gc_collect_cycles(void)
|
||||
@@ -1280,6 +1456,10 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
zend_refcounted *p;
|
||||
uint32_t gc_flags = 0;
|
||||
uint32_t idx, end;
|
||||
gc_stack stack;
|
||||
|
||||
stack.prev = NULL;
|
||||
stack.next = NULL;
|
||||
|
||||
if (GC_G(gc_active)) {
|
||||
return 0;
|
||||
@@ -1290,12 +1470,14 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
GC_G(gc_active) = 1;
|
||||
|
||||
GC_TRACE("Marking roots");
|
||||
gc_mark_roots();
|
||||
gc_mark_roots(&stack);
|
||||
GC_TRACE("Scanning roots");
|
||||
gc_scan_roots();
|
||||
gc_scan_roots(&stack);
|
||||
|
||||
GC_TRACE("Collecting roots");
|
||||
count = gc_collect_roots(&gc_flags);
|
||||
count = gc_collect_roots(&gc_flags, &stack);
|
||||
|
||||
gc_stack_free(&stack);
|
||||
|
||||
if (!GC_G(num_roots)) {
|
||||
/* nothing to free */
|
||||
|
||||
+16
-14
@@ -96,16 +96,18 @@ ZEND_API zend_execute_data* zend_generator_freeze_call_stack(zend_execute_data *
|
||||
/* }}} */
|
||||
|
||||
static void zend_generator_cleanup_unfinished_execution(
|
||||
zend_generator *generator, uint32_t catch_op_num) /* {{{ */
|
||||
zend_generator *generator, zend_execute_data *execute_data, uint32_t catch_op_num) /* {{{ */
|
||||
{
|
||||
zend_execute_data *execute_data = generator->execute_data;
|
||||
|
||||
if (execute_data->opline != execute_data->func->op_array.opcodes) {
|
||||
/* -1 required because we want the last run opcode, not the next to-be-run one. */
|
||||
uint32_t op_num = execute_data->opline - execute_data->func->op_array.opcodes - 1;
|
||||
|
||||
if (UNEXPECTED(generator->frozen_call_stack)) {
|
||||
/* Temporarily restore generator->execute_data if it has been NULLed out already. */
|
||||
zend_execute_data *save_ex = generator->execute_data;
|
||||
generator->execute_data = execute_data;
|
||||
zend_generator_restore_call_stack(generator);
|
||||
generator->execute_data = save_ex;
|
||||
}
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
|
||||
}
|
||||
@@ -116,6 +118,9 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
{
|
||||
if (EXPECTED(generator->execute_data)) {
|
||||
zend_execute_data *execute_data = generator->execute_data;
|
||||
/* Null out execute_data early, to prevent double frees if GC runs while we're
|
||||
* already cleaning up execute_data. */
|
||||
generator->execute_data = NULL;
|
||||
|
||||
if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
|
||||
zend_clean_and_cache_symbol_table(execute_data->symbol_table);
|
||||
@@ -123,8 +128,7 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
/* always free the CV's, in the symtable are only not-free'd IS_INDIRECT's */
|
||||
zend_free_compiled_variables(execute_data);
|
||||
|
||||
if ((EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) &&
|
||||
EXPECTED(GC_TYPE(Z_OBJ(execute_data->This)) == IS_OBJECT)) {
|
||||
if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
|
||||
OBJ_RELEASE(Z_OBJ(execute_data->This));
|
||||
}
|
||||
|
||||
@@ -135,17 +139,16 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
return;
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args(generator->execute_data);
|
||||
zend_vm_stack_free_extra_args(execute_data);
|
||||
|
||||
/* Some cleanups are only necessary if the generator was closed
|
||||
* before it could finish execution (reach a return statement). */
|
||||
if (UNEXPECTED(!finished_execution)) {
|
||||
zend_generator_cleanup_unfinished_execution(generator, 0);
|
||||
zend_generator_cleanup_unfinished_execution(generator, execute_data, 0);
|
||||
}
|
||||
|
||||
/* Free closure object */
|
||||
if ((EX_CALL_INFO() & ZEND_CALL_CLOSURE) &&
|
||||
EXPECTED(GC_TYPE(ZEND_CLOSURE_OBJECT(EX(func))) == IS_OBJECT)) {
|
||||
if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {
|
||||
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
|
||||
}
|
||||
|
||||
@@ -155,8 +158,7 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
generator->gc_buffer = NULL;
|
||||
}
|
||||
|
||||
efree(generator->execute_data);
|
||||
generator->execute_data = NULL;
|
||||
efree(execute_data);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -217,7 +219,7 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
|
||||
if (finally_op_num) {
|
||||
zval *fast_call;
|
||||
|
||||
zend_generator_cleanup_unfinished_execution(generator, finally_op_num);
|
||||
zend_generator_cleanup_unfinished_execution(generator, ex, finally_op_num);
|
||||
|
||||
fast_call = ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[finally_op_end].op1.var);
|
||||
Z_OBJ_P(fast_call) = EG(exception);
|
||||
@@ -273,7 +275,7 @@ static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */
|
||||
if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
|
||||
size += EX_NUM_ARGS() - op_array->num_args;
|
||||
}
|
||||
size += Z_TYPE(execute_data->This) == IS_OBJECT; /* $this */
|
||||
size += (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) != 0; /* $this */
|
||||
size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */
|
||||
|
||||
/* Live vars */
|
||||
@@ -354,7 +356,7 @@ static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {
|
||||
}
|
||||
}
|
||||
|
||||
if (Z_TYPE(execute_data->This) == IS_OBJECT) {
|
||||
if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
|
||||
ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This));
|
||||
}
|
||||
if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {
|
||||
|
||||
+3
-2
@@ -233,8 +233,9 @@ struct _zend_executor_globals {
|
||||
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
|
||||
};
|
||||
|
||||
#define EG_FLAGS_INITIAL 0x00
|
||||
#define EG_FLAGS_IN_SHUTDOWN 0x01
|
||||
#define EG_FLAGS_INITIAL (0)
|
||||
#define EG_FLAGS_IN_SHUTDOWN (1<<0)
|
||||
#define EG_FLAGS_OBJECT_STORE_NO_REUSE (1<<1)
|
||||
|
||||
struct _zend_ini_scanner_globals {
|
||||
zend_file_handle *yy_in;
|
||||
|
||||
+27
-52
@@ -64,7 +64,7 @@ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int lin
|
||||
zend_output_debug_string(1, "%s(%d) : ht=%p is inconsistent", file, line, ht);
|
||||
break;
|
||||
}
|
||||
zend_bailout();
|
||||
ZEND_ASSERT(0);
|
||||
}
|
||||
#define IS_CONSISTENT(a) _zend_is_inconsistent(a, __FILE__, __LINE__);
|
||||
#define SET_INCONSISTENT(n) do { \
|
||||
@@ -377,10 +377,8 @@ ZEND_API uint32_t zend_array_count(HashTable *ht)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static zend_always_inline HashPosition _zend_hash_get_first_pos(const HashTable *ht)
|
||||
static zend_always_inline HashPosition _zend_hash_get_valid_pos(const HashTable *ht, HashPosition pos)
|
||||
{
|
||||
HashPosition pos = 0;
|
||||
|
||||
while (pos < ht->nNumUsed && Z_ISUNDEF(ht->arData[pos].val)) {
|
||||
pos++;
|
||||
}
|
||||
@@ -389,12 +387,7 @@ static zend_always_inline HashPosition _zend_hash_get_first_pos(const HashTable
|
||||
|
||||
static zend_always_inline HashPosition _zend_hash_get_current_pos(const HashTable *ht)
|
||||
{
|
||||
HashPosition pos = ht->nInternalPointer;
|
||||
|
||||
if (pos == 0) {
|
||||
pos = _zend_hash_get_first_pos(ht);
|
||||
}
|
||||
return pos;
|
||||
return _zend_hash_get_valid_pos(ht, ht->nInternalPointer);
|
||||
}
|
||||
|
||||
ZEND_API HashPosition ZEND_FASTCALL zend_hash_get_current_pos(const HashTable *ht)
|
||||
@@ -488,6 +481,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_iterator_del(uint32_t idx)
|
||||
|
||||
if (EXPECTED(iter->ht) && EXPECTED(iter->ht != HT_POISONED_PTR)
|
||||
&& EXPECTED(!HT_ITERATORS_OVERFLOW(iter->ht))) {
|
||||
ZEND_ASSERT(HT_ITERATORS_COUNT(iter->ht) != 0);
|
||||
HT_DEC_ITERATORS_COUNT(iter->ht);
|
||||
}
|
||||
iter->ht = NULL;
|
||||
@@ -1077,6 +1071,7 @@ ZEND_API int ZEND_FASTCALL zend_hash_rehash(HashTable *ht)
|
||||
p++;
|
||||
} while (++i < ht->nNumUsed);
|
||||
} else {
|
||||
uint32_t old_num_used = ht->nNumUsed;
|
||||
do {
|
||||
if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) {
|
||||
uint32_t j = i;
|
||||
@@ -1133,6 +1128,12 @@ ZEND_API int ZEND_FASTCALL zend_hash_rehash(HashTable *ht)
|
||||
HT_HASH(ht, nIndex) = HT_IDX_TO_HASH(i);
|
||||
p++;
|
||||
} while (++i < ht->nNumUsed);
|
||||
|
||||
/* Migrate pointer to one past the end of the array to the new one past the end, so that
|
||||
* newly inserted elements are picked up correctly. */
|
||||
if (UNEXPECTED(HT_HAS_ITERATORS(ht))) {
|
||||
_zend_hash_iterators_update(ht, old_num_used, ht->nNumUsed);
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -1928,7 +1929,8 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->pDestructor = ZVAL_PTR_DTOR;
|
||||
|
||||
if (source->nNumOfElements == 0) {
|
||||
HT_FLAGS(target) = (HT_FLAGS(source) & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED)) | HASH_FLAG_STATIC_KEYS;
|
||||
uint32_t mask = HASH_FLAG_MASK & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED);
|
||||
HT_FLAGS(target) = (HT_FLAGS(source) & mask) | HASH_FLAG_STATIC_KEYS;
|
||||
target->nTableMask = HT_MIN_MASK;
|
||||
target->nNumUsed = 0;
|
||||
target->nNumOfElements = 0;
|
||||
@@ -1936,7 +1938,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->nInternalPointer = 0;
|
||||
HT_SET_DATA_ADDR(target, &uninitialized_bucket);
|
||||
} else if (GC_FLAGS(source) & IS_ARRAY_IMMUTABLE) {
|
||||
HT_FLAGS(target) = HT_FLAGS(source);
|
||||
HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK;
|
||||
target->nTableMask = source->nTableMask;
|
||||
target->nNumUsed = source->nNumUsed;
|
||||
target->nNumOfElements = source->nNumOfElements;
|
||||
@@ -1945,7 +1947,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->nInternalPointer = source->nInternalPointer;
|
||||
memcpy(HT_GET_DATA_ADDR(target), HT_GET_DATA_ADDR(source), HT_USED_SIZE(source));
|
||||
} else if (HT_FLAGS(source) & HASH_FLAG_PACKED) {
|
||||
HT_FLAGS(target) = HT_FLAGS(source);
|
||||
HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK;
|
||||
target->nTableMask = HT_MIN_MASK;
|
||||
target->nNumUsed = source->nNumUsed;
|
||||
target->nNumOfElements = source->nNumOfElements;
|
||||
@@ -1963,7 +1965,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
zend_array_dup_packed_elements(source, target, 1);
|
||||
}
|
||||
} else {
|
||||
HT_FLAGS(target) = HT_FLAGS(source);
|
||||
HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK;
|
||||
target->nTableMask = source->nTableMask;
|
||||
target->nNextFreeElement = source->nNextFreeElement;
|
||||
target->nInternalPointer =
|
||||
@@ -2189,7 +2191,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, H
|
||||
{
|
||||
IS_CONSISTENT(ht);
|
||||
HT_ASSERT(ht, &ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
|
||||
*pos = _zend_hash_get_first_pos(ht);
|
||||
*pos = _zend_hash_get_valid_pos(ht, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -2217,19 +2219,13 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex(HashTable *ht, Has
|
||||
|
||||
ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos)
|
||||
{
|
||||
uint32_t idx = *pos;
|
||||
uint32_t idx;
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
HT_ASSERT(ht, &ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
|
||||
|
||||
idx = _zend_hash_get_valid_pos(ht, *pos);
|
||||
if (idx < ht->nNumUsed) {
|
||||
if (idx == 0) {
|
||||
idx = _zend_hash_get_first_pos(ht);
|
||||
if (idx >= ht->nNumUsed) {
|
||||
*pos = idx;
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
while (1) {
|
||||
idx++;
|
||||
if (idx >= ht->nNumUsed) {
|
||||
@@ -2272,17 +2268,12 @@ ZEND_API int ZEND_FASTCALL zend_hash_move_backwards_ex(HashTable *ht, HashPositi
|
||||
/* This function should be made binary safe */
|
||||
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos)
|
||||
{
|
||||
uint32_t idx = *pos;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
idx = _zend_hash_get_valid_pos(ht, *pos);
|
||||
if (idx < ht->nNumUsed) {
|
||||
if (idx == 0) {
|
||||
idx = _zend_hash_get_first_pos(ht);
|
||||
if (idx >= ht->nNumUsed) {
|
||||
return HASH_KEY_NON_EXISTENT;
|
||||
}
|
||||
}
|
||||
p = ht->arData + idx;
|
||||
if (p->key) {
|
||||
*str_index = p->key;
|
||||
@@ -2297,20 +2288,14 @@ ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zen
|
||||
|
||||
ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos)
|
||||
{
|
||||
uint32_t idx = *pos;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
idx = _zend_hash_get_valid_pos(ht, *pos);
|
||||
if (idx >= ht->nNumUsed) {
|
||||
ZVAL_NULL(key);
|
||||
} else {
|
||||
if (idx == 0) {
|
||||
idx = _zend_hash_get_first_pos(ht);
|
||||
if (idx >= ht->nNumUsed) {
|
||||
ZVAL_NULL(key);
|
||||
return;
|
||||
}
|
||||
}
|
||||
p = ht->arData + idx;
|
||||
if (p->key) {
|
||||
ZVAL_STR_COPY(key, p->key);
|
||||
@@ -2322,17 +2307,12 @@ ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex(const HashTable *h
|
||||
|
||||
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos)
|
||||
{
|
||||
uint32_t idx = *pos;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
idx = _zend_hash_get_valid_pos(ht, *pos);
|
||||
if (idx < ht->nNumUsed) {
|
||||
if (idx == 0) {
|
||||
idx = _zend_hash_get_first_pos(ht);
|
||||
if (idx >= ht->nNumUsed) {
|
||||
return HASH_KEY_NON_EXISTENT;
|
||||
}
|
||||
}
|
||||
p = ht->arData + idx;
|
||||
if (p->key) {
|
||||
return HASH_KEY_IS_STRING;
|
||||
@@ -2346,17 +2326,12 @@ ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, Hash
|
||||
|
||||
ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos)
|
||||
{
|
||||
uint32_t idx = *pos;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
idx = _zend_hash_get_valid_pos(ht, *pos);
|
||||
if (idx < ht->nNumUsed) {
|
||||
if (idx == 0) {
|
||||
idx = _zend_hash_get_first_pos(ht);
|
||||
if (idx >= ht->nNumUsed) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
p = ht->arData + idx;
|
||||
return &p->val;
|
||||
} else {
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
#define HASH_FLAG_HAS_EMPTY_IND (1<<5)
|
||||
#define HASH_FLAG_ALLOW_COW_VIOLATION (1<<6)
|
||||
|
||||
/* Only the low byte are real flags */
|
||||
#define HASH_FLAG_MASK 0xff
|
||||
|
||||
#define HT_FLAGS(ht) (ht)->u.flags
|
||||
|
||||
#define HT_IS_PACKED(ht) \
|
||||
|
||||
@@ -208,8 +208,8 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
|
||||
fe_class_name = ZEND_TYPE_NAME(fe_arg_info->type);
|
||||
class_name = ZSTR_VAL(fe_class_name);
|
||||
class_name_len = ZSTR_LEN(fe_class_name);
|
||||
if (class_name_len == sizeof("parent")-1 && !strcasecmp(class_name, "parent") && proto->common.scope) {
|
||||
fe_class_name = zend_string_copy(proto->common.scope->name);
|
||||
if (class_name_len == sizeof("parent")-1 && !strcasecmp(class_name, "parent") && fe->common.scope && fe->common.scope->parent) {
|
||||
fe_class_name = zend_string_copy(fe->common.scope->parent->name);
|
||||
} else if (class_name_len == sizeof("self")-1 && !strcasecmp(class_name, "self") && fe->common.scope) {
|
||||
fe_class_name = zend_string_copy(fe->common.scope->name);
|
||||
} else {
|
||||
@@ -894,6 +894,9 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
|
||||
}
|
||||
if (UNEXPECTED(parent_ce->type != ce->type)) {
|
||||
/* User class extends internal */
|
||||
if (CE_STATIC_MEMBERS(parent_ce) == NULL) {
|
||||
zend_class_init_statics(parent_ce);
|
||||
}
|
||||
if (UNEXPECTED(zend_update_class_constants(parent_ce) != SUCCESS)) {
|
||||
ZEND_ASSERT(0);
|
||||
}
|
||||
|
||||
+18
-16
@@ -46,6 +46,22 @@ int ini_parse(void);
|
||||
|
||||
#define ZEND_SYSTEM_INI CG(ini_parser_unbuffered_errors)
|
||||
|
||||
static int get_int_val(zval *op) {
|
||||
switch (Z_TYPE_P(op)) {
|
||||
case IS_LONG:
|
||||
return Z_LVAL_P(op);
|
||||
case IS_DOUBLE:
|
||||
return (int)Z_DVAL_P(op);
|
||||
case IS_STRING:
|
||||
{
|
||||
int val = atoi(Z_STRVAL_P(op));
|
||||
zend_string_free(Z_STR_P(op));
|
||||
return val;
|
||||
}
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
}
|
||||
|
||||
/* {{{ zend_ini_do_op()
|
||||
*/
|
||||
static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
@@ -55,22 +71,8 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
int str_len;
|
||||
char str_result[MAX_LENGTH_OF_LONG+1];
|
||||
|
||||
if (IS_LONG == Z_TYPE_P(op1)) {
|
||||
i_op1 = Z_LVAL_P(op1);
|
||||
} else {
|
||||
i_op1 = atoi(Z_STRVAL_P(op1));
|
||||
zend_string_free(Z_STR_P(op1));
|
||||
}
|
||||
if (op2) {
|
||||
if (IS_LONG == Z_TYPE_P(op2)) {
|
||||
i_op2 = Z_LVAL_P(op2);
|
||||
} else {
|
||||
i_op2 = atoi(Z_STRVAL_P(op2));
|
||||
zend_string_free(Z_STR_P(op2));
|
||||
}
|
||||
} else {
|
||||
i_op2 = 0;
|
||||
}
|
||||
i_op1 = get_int_val(op1);
|
||||
i_op2 = op2 ? get_int_val(op2) : 0;
|
||||
|
||||
switch (type) {
|
||||
case '|':
|
||||
|
||||
+122
-121
@@ -143,13 +143,14 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
|
||||
ZVAL_NEW_STR(retval, zend_string_init(str, len, ZEND_SYSTEM_INI))
|
||||
|
||||
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED) { \
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED && \
|
||||
(YYSTATE == STATE(ST_VALUE) || YYSTATE == STATE(ST_RAW))) {\
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
}
|
||||
|
||||
static inline int convert_to_number(zval *retval, const char *str, const int str_len)
|
||||
@@ -382,7 +383,7 @@ restart:
|
||||
}
|
||||
}
|
||||
|
||||
#line 386 "Zend/zend_ini_scanner.c"
|
||||
#line 387 "Zend/zend_ini_scanner.c"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
@@ -504,7 +505,7 @@ yy4:
|
||||
yy5:
|
||||
YYDEBUG(5, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 481 "Zend/zend_ini_scanner.l"
|
||||
#line 482 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get option name */
|
||||
/* Eat leading whitespace */
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -514,7 +515,7 @@ yy5:
|
||||
|
||||
RETURN_TOKEN(TC_LABEL, yytext, yyleng);
|
||||
}
|
||||
#line 518 "Zend/zend_ini_scanner.c"
|
||||
#line 519 "Zend/zend_ini_scanner.c"
|
||||
yy6:
|
||||
YYDEBUG(6, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -538,24 +539,24 @@ yy6:
|
||||
yy8:
|
||||
YYDEBUG(8, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 634 "Zend/zend_ini_scanner.l"
|
||||
#line 635 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
/* eat whitespace */
|
||||
goto restart;
|
||||
}
|
||||
#line 547 "Zend/zend_ini_scanner.c"
|
||||
#line 548 "Zend/zend_ini_scanner.c"
|
||||
yy9:
|
||||
YYDEBUG(9, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy10:
|
||||
YYDEBUG(10, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 639 "Zend/zend_ini_scanner.l"
|
||||
#line 640 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 559 "Zend/zend_ini_scanner.c"
|
||||
#line 560 "Zend/zend_ini_scanner.c"
|
||||
yy11:
|
||||
YYDEBUG(11, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -616,11 +617,11 @@ yy14:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(15, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 562 "Zend/zend_ini_scanner.l"
|
||||
#line 563 "Zend/zend_ini_scanner.l"
|
||||
{ /* Disallow these chars outside option values */
|
||||
return yytext[0];
|
||||
}
|
||||
#line 624 "Zend/zend_ini_scanner.c"
|
||||
#line 625 "Zend/zend_ini_scanner.c"
|
||||
yy16:
|
||||
YYDEBUG(16, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -642,7 +643,7 @@ yy18:
|
||||
if (yych == ' ') goto yy18;
|
||||
YYDEBUG(20, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 491 "Zend/zend_ini_scanner.l"
|
||||
#line 492 "Zend/zend_ini_scanner.l"
|
||||
{ /* Start option value */
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW) {
|
||||
BEGIN(ST_RAW);
|
||||
@@ -651,7 +652,7 @@ yy18:
|
||||
}
|
||||
return '=';
|
||||
}
|
||||
#line 655 "Zend/zend_ini_scanner.c"
|
||||
#line 656 "Zend/zend_ini_scanner.c"
|
||||
yy21:
|
||||
YYDEBUG(21, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -707,7 +708,7 @@ yy26:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(27, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 406 "Zend/zend_ini_scanner.l"
|
||||
#line 407 "Zend/zend_ini_scanner.l"
|
||||
{ /* Section start */
|
||||
/* Enter section data lookup state */
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW) {
|
||||
@@ -717,7 +718,7 @@ yy26:
|
||||
}
|
||||
return TC_SECTION;
|
||||
}
|
||||
#line 721 "Zend/zend_ini_scanner.c"
|
||||
#line 722 "Zend/zend_ini_scanner.c"
|
||||
yy28:
|
||||
YYDEBUG(28, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -728,7 +729,7 @@ yy28:
|
||||
if (yych == ' ') goto yy28;
|
||||
YYDEBUG(30, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 431 "Zend/zend_ini_scanner.l"
|
||||
#line 432 "Zend/zend_ini_scanner.l"
|
||||
{ /* Start of option with offset */
|
||||
/* Eat leading whitespace */
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -741,20 +742,20 @@ yy28:
|
||||
|
||||
RETURN_TOKEN(TC_OFFSET, yytext, yyleng);
|
||||
}
|
||||
#line 745 "Zend/zend_ini_scanner.c"
|
||||
#line 746 "Zend/zend_ini_scanner.c"
|
||||
yy31:
|
||||
YYDEBUG(31, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy32:
|
||||
YYDEBUG(32, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 644 "Zend/zend_ini_scanner.l"
|
||||
#line 645 "Zend/zend_ini_scanner.l"
|
||||
{ /* Comment */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 758 "Zend/zend_ini_scanner.c"
|
||||
#line 759 "Zend/zend_ini_scanner.c"
|
||||
yy33:
|
||||
YYDEBUG(33, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -809,11 +810,11 @@ yy35:
|
||||
yy36:
|
||||
YYDEBUG(36, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 473 "Zend/zend_ini_scanner.l"
|
||||
#line 474 "Zend/zend_ini_scanner.l"
|
||||
{ /* FALSE value (when used outside option value/offset this causes parse error!)*/
|
||||
RETURN_TOKEN(BOOL_FALSE, "", 0);
|
||||
}
|
||||
#line 817 "Zend/zend_ini_scanner.c"
|
||||
#line 818 "Zend/zend_ini_scanner.c"
|
||||
yy37:
|
||||
YYDEBUG(37, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -870,11 +871,11 @@ yy39:
|
||||
yy41:
|
||||
YYDEBUG(41, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 469 "Zend/zend_ini_scanner.l"
|
||||
#line 470 "Zend/zend_ini_scanner.l"
|
||||
{ /* TRUE value (when used outside option value/offset this causes parse error!) */
|
||||
RETURN_TOKEN(BOOL_TRUE, "1", 1);
|
||||
}
|
||||
#line 878 "Zend/zend_ini_scanner.c"
|
||||
#line 879 "Zend/zend_ini_scanner.c"
|
||||
yy42:
|
||||
YYDEBUG(42, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1021,11 +1022,11 @@ yy54:
|
||||
yy56:
|
||||
YYDEBUG(56, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 477 "Zend/zend_ini_scanner.l"
|
||||
#line 478 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
RETURN_TOKEN(NULL_NULL, "", 0);
|
||||
}
|
||||
#line 1029 "Zend/zend_ini_scanner.c"
|
||||
#line 1030 "Zend/zend_ini_scanner.c"
|
||||
yy57:
|
||||
YYDEBUG(57, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1134,11 +1135,11 @@ yy62:
|
||||
yy63:
|
||||
YYDEBUG(63, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 580 "Zend/zend_ini_scanner.l"
|
||||
#line 581 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get rest as section/offset value */
|
||||
RETURN_TOKEN(TC_STRING, yytext, yyleng);
|
||||
}
|
||||
#line 1142 "Zend/zend_ini_scanner.c"
|
||||
#line 1143 "Zend/zend_ini_scanner.c"
|
||||
yy64:
|
||||
YYDEBUG(64, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -1178,22 +1179,22 @@ yy66:
|
||||
yy67:
|
||||
YYDEBUG(67, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 1186 "Zend/zend_ini_scanner.c"
|
||||
#line 1187 "Zend/zend_ini_scanner.c"
|
||||
yy68:
|
||||
YYDEBUG(68, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(69, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 584 "Zend/zend_ini_scanner.l"
|
||||
#line 585 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string start */
|
||||
yy_push_state(ST_DOUBLE_QUOTES);
|
||||
return '"';
|
||||
}
|
||||
#line 1197 "Zend/zend_ini_scanner.c"
|
||||
#line 1198 "Zend/zend_ini_scanner.c"
|
||||
yy70:
|
||||
YYDEBUG(70, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1258,11 +1259,11 @@ yy73:
|
||||
yy75:
|
||||
YYDEBUG(75, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 558 "Zend/zend_ini_scanner.l"
|
||||
#line 559 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get number option value as string */
|
||||
RETURN_TOKEN(TC_NUMBER, yytext, yyleng);
|
||||
}
|
||||
#line 1266 "Zend/zend_ini_scanner.c"
|
||||
#line 1267 "Zend/zend_ini_scanner.c"
|
||||
yy76:
|
||||
YYDEBUG(76, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -1295,11 +1296,11 @@ yy76:
|
||||
yy78:
|
||||
YYDEBUG(78, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 554 "Zend/zend_ini_scanner.l"
|
||||
#line 555 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get constant option value */
|
||||
RETURN_TOKEN(TC_CONSTANT, yytext, yyleng);
|
||||
}
|
||||
#line 1303 "Zend/zend_ini_scanner.c"
|
||||
#line 1304 "Zend/zend_ini_scanner.c"
|
||||
yy79:
|
||||
YYDEBUG(79, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1311,12 +1312,12 @@ yy80:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(81, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 444 "Zend/zend_ini_scanner.l"
|
||||
#line 445 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of section or an option offset */
|
||||
BEGIN(INITIAL);
|
||||
return ']';
|
||||
}
|
||||
#line 1320 "Zend/zend_ini_scanner.c"
|
||||
#line 1321 "Zend/zend_ini_scanner.c"
|
||||
yy82:
|
||||
YYDEBUG(82, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1356,12 +1357,12 @@ yy86:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(87, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 1365 "Zend/zend_ini_scanner.c"
|
||||
#line 1366 "Zend/zend_ini_scanner.c"
|
||||
yy88:
|
||||
YYDEBUG(88, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1415,7 +1416,7 @@ yy92:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(93, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 416 "Zend/zend_ini_scanner.l"
|
||||
#line 417 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw string */
|
||||
/* Eat leading and trailing single quotes */
|
||||
if (yytext[0] == '\'' && yytext[yyleng - 1] == '\'') {
|
||||
@@ -1424,7 +1425,7 @@ yy92:
|
||||
}
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 1428 "Zend/zend_ini_scanner.c"
|
||||
#line 1429 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_SECTION_VALUE:
|
||||
@@ -1524,11 +1525,11 @@ yy97:
|
||||
yy98:
|
||||
YYDEBUG(98, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 580 "Zend/zend_ini_scanner.l"
|
||||
#line 581 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get rest as section/offset value */
|
||||
RETURN_TOKEN(TC_STRING, yytext, yyleng);
|
||||
}
|
||||
#line 1532 "Zend/zend_ini_scanner.c"
|
||||
#line 1533 "Zend/zend_ini_scanner.c"
|
||||
yy99:
|
||||
YYDEBUG(99, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -1568,22 +1569,22 @@ yy101:
|
||||
yy102:
|
||||
YYDEBUG(102, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 1576 "Zend/zend_ini_scanner.c"
|
||||
#line 1577 "Zend/zend_ini_scanner.c"
|
||||
yy103:
|
||||
YYDEBUG(103, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(104, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 584 "Zend/zend_ini_scanner.l"
|
||||
#line 585 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string start */
|
||||
yy_push_state(ST_DOUBLE_QUOTES);
|
||||
return '"';
|
||||
}
|
||||
#line 1587 "Zend/zend_ini_scanner.c"
|
||||
#line 1588 "Zend/zend_ini_scanner.c"
|
||||
yy105:
|
||||
YYDEBUG(105, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1648,11 +1649,11 @@ yy108:
|
||||
yy110:
|
||||
YYDEBUG(110, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 558 "Zend/zend_ini_scanner.l"
|
||||
#line 559 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get number option value as string */
|
||||
RETURN_TOKEN(TC_NUMBER, yytext, yyleng);
|
||||
}
|
||||
#line 1656 "Zend/zend_ini_scanner.c"
|
||||
#line 1657 "Zend/zend_ini_scanner.c"
|
||||
yy111:
|
||||
YYDEBUG(111, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -1685,11 +1686,11 @@ yy111:
|
||||
yy113:
|
||||
YYDEBUG(113, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 554 "Zend/zend_ini_scanner.l"
|
||||
#line 555 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get constant option value */
|
||||
RETURN_TOKEN(TC_CONSTANT, yytext, yyleng);
|
||||
}
|
||||
#line 1693 "Zend/zend_ini_scanner.c"
|
||||
#line 1694 "Zend/zend_ini_scanner.c"
|
||||
yy114:
|
||||
YYDEBUG(114, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1713,13 +1714,13 @@ yy115:
|
||||
yy117:
|
||||
YYDEBUG(117, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 425 "Zend/zend_ini_scanner.l"
|
||||
#line 426 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of section */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return ']';
|
||||
}
|
||||
#line 1723 "Zend/zend_ini_scanner.c"
|
||||
#line 1724 "Zend/zend_ini_scanner.c"
|
||||
yy118:
|
||||
YYDEBUG(118, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1759,12 +1760,12 @@ yy122:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(123, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 1768 "Zend/zend_ini_scanner.c"
|
||||
#line 1769 "Zend/zend_ini_scanner.c"
|
||||
yy124:
|
||||
YYDEBUG(124, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1827,7 +1828,7 @@ yy130:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(131, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 416 "Zend/zend_ini_scanner.l"
|
||||
#line 417 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw string */
|
||||
/* Eat leading and trailing single quotes */
|
||||
if (yytext[0] == '\'' && yytext[yyleng - 1] == '\'') {
|
||||
@@ -1836,7 +1837,7 @@ yy130:
|
||||
}
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 1840 "Zend/zend_ini_scanner.c"
|
||||
#line 1841 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_VALUE:
|
||||
@@ -1972,12 +1973,12 @@ yy134:
|
||||
yy135:
|
||||
YYDEBUG(135, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 650 "Zend/zend_ini_scanner.l"
|
||||
#line 651 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value (if EOF is reached before EOL */
|
||||
BEGIN(INITIAL);
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 1981 "Zend/zend_ini_scanner.c"
|
||||
#line 1982 "Zend/zend_ini_scanner.c"
|
||||
yy136:
|
||||
YYDEBUG(136, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -1994,11 +1995,11 @@ yy137:
|
||||
yy138:
|
||||
YYDEBUG(138, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 576 "Zend/zend_ini_scanner.l"
|
||||
#line 577 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get everything else as option/offset value */
|
||||
RETURN_TOKEN(TC_STRING, yytext, yyleng);
|
||||
}
|
||||
#line 2002 "Zend/zend_ini_scanner.c"
|
||||
#line 2003 "Zend/zend_ini_scanner.c"
|
||||
yy139:
|
||||
YYDEBUG(139, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -2022,24 +2023,24 @@ yy139:
|
||||
yy141:
|
||||
YYDEBUG(141, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 630 "Zend/zend_ini_scanner.l"
|
||||
#line 631 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
RETURN_TOKEN(TC_WHITESPACE, yytext, yyleng);
|
||||
}
|
||||
#line 2030 "Zend/zend_ini_scanner.c"
|
||||
#line 2031 "Zend/zend_ini_scanner.c"
|
||||
yy142:
|
||||
YYDEBUG(142, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy143:
|
||||
YYDEBUG(143, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 548 "Zend/zend_ini_scanner.l"
|
||||
#line 549 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 2043 "Zend/zend_ini_scanner.c"
|
||||
#line 2044 "Zend/zend_ini_scanner.c"
|
||||
yy144:
|
||||
YYDEBUG(144, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2055,22 +2056,22 @@ yy145:
|
||||
if (yych == ' ') goto yy145;
|
||||
YYDEBUG(147, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 566 "Zend/zend_ini_scanner.l"
|
||||
#line 567 "Zend/zend_ini_scanner.l"
|
||||
{ /* Boolean operators */
|
||||
return yytext[0];
|
||||
}
|
||||
#line 2063 "Zend/zend_ini_scanner.c"
|
||||
#line 2064 "Zend/zend_ini_scanner.c"
|
||||
yy148:
|
||||
YYDEBUG(148, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(149, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 584 "Zend/zend_ini_scanner.l"
|
||||
#line 585 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string start */
|
||||
yy_push_state(ST_DOUBLE_QUOTES);
|
||||
return '"';
|
||||
}
|
||||
#line 2074 "Zend/zend_ini_scanner.c"
|
||||
#line 2075 "Zend/zend_ini_scanner.c"
|
||||
yy150:
|
||||
YYDEBUG(150, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2144,11 +2145,11 @@ yy153:
|
||||
yy155:
|
||||
YYDEBUG(155, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 558 "Zend/zend_ini_scanner.l"
|
||||
#line 559 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get number option value as string */
|
||||
RETURN_TOKEN(TC_NUMBER, yytext, yyleng);
|
||||
}
|
||||
#line 2152 "Zend/zend_ini_scanner.c"
|
||||
#line 2153 "Zend/zend_ini_scanner.c"
|
||||
yy156:
|
||||
YYDEBUG(156, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -2165,13 +2166,13 @@ yy158:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(159, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 570 "Zend/zend_ini_scanner.l"
|
||||
#line 571 "Zend/zend_ini_scanner.l"
|
||||
{ /* Make = used in option value to trigger error */
|
||||
yyless(0);
|
||||
BEGIN(INITIAL);
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 2175 "Zend/zend_ini_scanner.c"
|
||||
#line 2176 "Zend/zend_ini_scanner.c"
|
||||
yy160:
|
||||
YYDEBUG(160, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -2218,11 +2219,11 @@ yy160:
|
||||
yy162:
|
||||
YYDEBUG(162, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 554 "Zend/zend_ini_scanner.l"
|
||||
#line 555 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get constant option value */
|
||||
RETURN_TOKEN(TC_CONSTANT, yytext, yyleng);
|
||||
}
|
||||
#line 2226 "Zend/zend_ini_scanner.c"
|
||||
#line 2227 "Zend/zend_ini_scanner.c"
|
||||
yy163:
|
||||
YYDEBUG(163, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -2556,12 +2557,12 @@ yy171:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(172, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 2565 "Zend/zend_ini_scanner.c"
|
||||
#line 2566 "Zend/zend_ini_scanner.c"
|
||||
yy173:
|
||||
YYDEBUG(173, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -2627,13 +2628,13 @@ yy177:
|
||||
yy178:
|
||||
YYDEBUG(178, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 644 "Zend/zend_ini_scanner.l"
|
||||
#line 645 "Zend/zend_ini_scanner.l"
|
||||
{ /* Comment */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 2637 "Zend/zend_ini_scanner.c"
|
||||
#line 2638 "Zend/zend_ini_scanner.c"
|
||||
yy179:
|
||||
YYDEBUG(179, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2744,11 +2745,11 @@ yy181:
|
||||
yy182:
|
||||
YYDEBUG(182, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 473 "Zend/zend_ini_scanner.l"
|
||||
#line 474 "Zend/zend_ini_scanner.l"
|
||||
{ /* FALSE value (when used outside option value/offset this causes parse error!)*/
|
||||
RETURN_TOKEN(BOOL_FALSE, "", 0);
|
||||
}
|
||||
#line 2752 "Zend/zend_ini_scanner.c"
|
||||
#line 2753 "Zend/zend_ini_scanner.c"
|
||||
yy183:
|
||||
YYDEBUG(183, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -2895,11 +2896,11 @@ yy185:
|
||||
yy186:
|
||||
YYDEBUG(186, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 469 "Zend/zend_ini_scanner.l"
|
||||
#line 470 "Zend/zend_ini_scanner.l"
|
||||
{ /* TRUE value (when used outside option value/offset this causes parse error!) */
|
||||
RETURN_TOKEN(BOOL_TRUE, "1", 1);
|
||||
}
|
||||
#line 2903 "Zend/zend_ini_scanner.c"
|
||||
#line 2904 "Zend/zend_ini_scanner.c"
|
||||
yy187:
|
||||
YYDEBUG(187, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -3019,7 +3020,7 @@ yy191:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(192, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 416 "Zend/zend_ini_scanner.l"
|
||||
#line 417 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw string */
|
||||
/* Eat leading and trailing single quotes */
|
||||
if (yytext[0] == '\'' && yytext[yyleng - 1] == '\'') {
|
||||
@@ -3028,7 +3029,7 @@ yy191:
|
||||
}
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 3032 "Zend/zend_ini_scanner.c"
|
||||
#line 3033 "Zend/zend_ini_scanner.c"
|
||||
yy193:
|
||||
YYDEBUG(193, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -3343,11 +3344,11 @@ yy202:
|
||||
yy203:
|
||||
YYDEBUG(203, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 477 "Zend/zend_ini_scanner.l"
|
||||
#line 478 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
RETURN_TOKEN(NULL_NULL, "", 0);
|
||||
}
|
||||
#line 3351 "Zend/zend_ini_scanner.c"
|
||||
#line 3352 "Zend/zend_ini_scanner.c"
|
||||
yy204:
|
||||
YYDEBUG(204, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3414,21 +3415,21 @@ yy208:
|
||||
}
|
||||
YYDEBUG(210, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 544 "Zend/zend_ini_scanner.l"
|
||||
#line 545 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 3422 "Zend/zend_ini_scanner.c"
|
||||
#line 3423 "Zend/zend_ini_scanner.c"
|
||||
yy211:
|
||||
YYDEBUG(211, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(212, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 3432 "Zend/zend_ini_scanner.c"
|
||||
#line 3433 "Zend/zend_ini_scanner.c"
|
||||
yy213:
|
||||
YYDEBUG(213, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3444,13 +3445,13 @@ yy213:
|
||||
yy215:
|
||||
YYDEBUG(215, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 425 "Zend/zend_ini_scanner.l"
|
||||
#line 426 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of section */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return ']';
|
||||
}
|
||||
#line 3454 "Zend/zend_ini_scanner.c"
|
||||
#line 3455 "Zend/zend_ini_scanner.c"
|
||||
yy216:
|
||||
YYDEBUG(216, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3508,7 +3509,7 @@ yyc_ST_DOUBLE_QUOTES:
|
||||
yy221:
|
||||
YYDEBUG(221, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 594 "Zend/zend_ini_scanner.l"
|
||||
#line 595 "Zend/zend_ini_scanner.l"
|
||||
{ /* Escape double quoted string contents */
|
||||
if (YYCURSOR > YYLIMIT) {
|
||||
return 0;
|
||||
@@ -3544,7 +3545,7 @@ yy221:
|
||||
zend_ini_escape_string(ini_lval, yytext, yyleng, '"');
|
||||
return TC_QUOTED_STRING;
|
||||
}
|
||||
#line 3548 "Zend/zend_ini_scanner.c"
|
||||
#line 3549 "Zend/zend_ini_scanner.c"
|
||||
yy222:
|
||||
YYDEBUG(222, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3556,12 +3557,12 @@ yy222:
|
||||
}
|
||||
YYDEBUG(224, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 589 "Zend/zend_ini_scanner.l"
|
||||
#line 590 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string ends */
|
||||
yy_pop_state();
|
||||
return '"';
|
||||
}
|
||||
#line 3565 "Zend/zend_ini_scanner.c"
|
||||
#line 3566 "Zend/zend_ini_scanner.c"
|
||||
yy225:
|
||||
YYDEBUG(225, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3570,12 +3571,12 @@ yy225:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(227, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 3579 "Zend/zend_ini_scanner.c"
|
||||
#line 3580 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_VARNAME:
|
||||
@@ -3633,7 +3634,7 @@ yy230:
|
||||
}
|
||||
YYDEBUG(232, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 454 "Zend/zend_ini_scanner.l"
|
||||
#line 455 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable name */
|
||||
/* Eat leading whitespace */
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -3643,28 +3644,28 @@ yy230:
|
||||
|
||||
RETURN_TOKEN(TC_VARNAME, yytext, yyleng);
|
||||
}
|
||||
#line 3647 "Zend/zend_ini_scanner.c"
|
||||
#line 3648 "Zend/zend_ini_scanner.c"
|
||||
yy233:
|
||||
YYDEBUG(233, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(234, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 3657 "Zend/zend_ini_scanner.c"
|
||||
#line 3658 "Zend/zend_ini_scanner.c"
|
||||
yy235:
|
||||
YYDEBUG(235, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(236, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 464 "Zend/zend_ini_scanner.l"
|
||||
#line 465 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable end */
|
||||
yy_pop_state();
|
||||
return '}';
|
||||
}
|
||||
#line 3668 "Zend/zend_ini_scanner.c"
|
||||
#line 3669 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_RAW:
|
||||
@@ -3728,19 +3729,19 @@ yyc_ST_RAW:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(240, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 650 "Zend/zend_ini_scanner.l"
|
||||
#line 651 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value (if EOF is reached before EOL */
|
||||
BEGIN(INITIAL);
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 3737 "Zend/zend_ini_scanner.c"
|
||||
#line 3738 "Zend/zend_ini_scanner.c"
|
||||
yy241:
|
||||
YYDEBUG(241, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy242:
|
||||
YYDEBUG(242, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 500 "Zend/zend_ini_scanner.l"
|
||||
#line 501 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
|
||||
unsigned char *sc = NULL;
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -3784,7 +3785,7 @@ end_raw_value_chars:
|
||||
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 3788 "Zend/zend_ini_scanner.c"
|
||||
#line 3789 "Zend/zend_ini_scanner.c"
|
||||
yy243:
|
||||
YYDEBUG(243, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3808,13 +3809,13 @@ yy244:
|
||||
yy245:
|
||||
YYDEBUG(245, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 548 "Zend/zend_ini_scanner.l"
|
||||
#line 549 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 3818 "Zend/zend_ini_scanner.c"
|
||||
#line 3819 "Zend/zend_ini_scanner.c"
|
||||
yy246:
|
||||
YYDEBUG(246, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3851,25 +3852,25 @@ yy250:
|
||||
yy251:
|
||||
YYDEBUG(251, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 634 "Zend/zend_ini_scanner.l"
|
||||
#line 635 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
/* eat whitespace */
|
||||
goto restart;
|
||||
}
|
||||
#line 3860 "Zend/zend_ini_scanner.c"
|
||||
#line 3861 "Zend/zend_ini_scanner.c"
|
||||
yy252:
|
||||
YYDEBUG(252, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy253:
|
||||
YYDEBUG(253, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 644 "Zend/zend_ini_scanner.l"
|
||||
#line 645 "Zend/zend_ini_scanner.l"
|
||||
{ /* Comment */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 3873 "Zend/zend_ini_scanner.c"
|
||||
#line 3874 "Zend/zend_ini_scanner.c"
|
||||
yy254:
|
||||
YYDEBUG(254, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3877,6 +3878,6 @@ yy254:
|
||||
goto yy253;
|
||||
}
|
||||
}
|
||||
#line 659 "Zend/zend_ini_scanner.l"
|
||||
#line 660 "Zend/zend_ini_scanner.l"
|
||||
|
||||
}
|
||||
@@ -140,13 +140,14 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
|
||||
ZVAL_NEW_STR(retval, zend_string_init(str, len, ZEND_SYSTEM_INI))
|
||||
|
||||
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED) { \
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED && \
|
||||
(YYSTATE == STATE(ST_VALUE) || YYSTATE == STATE(ST_RAW))) {\
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
}
|
||||
|
||||
static inline int convert_to_number(zval *retval, const char *str, const int str_len)
|
||||
|
||||
@@ -1312,7 +1312,7 @@ static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
|
||||
|
||||
if (LANG_SCNG(yy_text)[0] == 0 &&
|
||||
LANG_SCNG(yy_leng) == 1 &&
|
||||
memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
|
||||
strcmp(yystr, "\"end of file\"") == 0) {
|
||||
if (yyres) {
|
||||
yystpcpy(yyres, "end of file");
|
||||
}
|
||||
|
||||
+376
-355
File diff suppressed because it is too large.
Load diff
@@ -115,6 +115,7 @@ do { \
|
||||
#define GET_DOUBLE_QUOTES_SCANNED_LENGTH() SCNG(scanned_string_len)
|
||||
|
||||
#define IS_LABEL_START(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x80)
|
||||
#define IS_LABEL_SUCCESSOR(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || ((c) >= '0' && (c) <= '9') || (c) == '_' || (c) >= 0x80)
|
||||
|
||||
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
|
||||
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
|
||||
@@ -1781,7 +1782,8 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
char *end;
|
||||
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
|
||||
errno = 0;
|
||||
ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, &end, 0));
|
||||
/* base must be passed explicitly for correct parse error on Windows */
|
||||
ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, &end, yytext[0] == '0' ? 8 : 10));
|
||||
/* This isn't an assert, we need to ensure 019 isn't valid octal
|
||||
* Because the lexing itself doesn't do that for us
|
||||
*/
|
||||
@@ -2096,7 +2098,7 @@ inline_char_handler:
|
||||
|
||||
if (YYCURSOR < YYLIMIT) {
|
||||
YYCURSOR++;
|
||||
} else {
|
||||
} else if (!SCNG(heredoc_scan_ahead)) {
|
||||
zend_error(E_COMPILE_WARNING, "Unterminated comment starting line %d", CG(zend_lineno));
|
||||
}
|
||||
|
||||
@@ -2318,9 +2320,12 @@ skip_escape_conversion:
|
||||
|
||||
/* Check for ending label on the next line */
|
||||
if (heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, heredoc_label->length)) {
|
||||
if (!IS_LABEL_START(YYCURSOR[heredoc_label->length])) {
|
||||
if (!IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
|
||||
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
|
||||
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
|
||||
if (PARSER_MODE()) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
YYCURSOR = saved_cursor;
|
||||
@@ -2337,6 +2342,7 @@ skip_escape_conversion:
|
||||
zend_lex_state current_state;
|
||||
int heredoc_nesting_level = 1;
|
||||
int first_token = 0;
|
||||
int error = 0;
|
||||
|
||||
zend_save_lexical_state(¤t_state);
|
||||
|
||||
@@ -2384,6 +2390,7 @@ skip_escape_conversion:
|
||||
|| first_token == T_CURLY_OPEN
|
||||
) && SCNG(heredoc_indentation)) {
|
||||
zend_throw_exception_ex(zend_ce_parse_error, 0, "Invalid body indentation level (expecting an indentation level of at least %d)", SCNG(heredoc_indentation));
|
||||
error = 1;
|
||||
}
|
||||
|
||||
heredoc_label->indentation = SCNG(heredoc_indentation);
|
||||
@@ -2392,6 +2399,10 @@ skip_escape_conversion:
|
||||
zend_restore_lexical_state(¤t_state);
|
||||
SCNG(heredoc_scan_ahead) = 0;
|
||||
CG(increment_lineno) = 0;
|
||||
|
||||
if (PARSER_MODE() && error) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TOKEN(T_START_HEREDOC);
|
||||
@@ -2575,12 +2586,15 @@ double_quotes_scan_done:
|
||||
|
||||
/* Check for ending label on the next line */
|
||||
if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
|
||||
if (IS_LABEL_START(YYCURSOR[heredoc_label->length])) {
|
||||
if (IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
|
||||
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
|
||||
if (PARSER_MODE()) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* newline before label will be subtracted from returned text, but
|
||||
@@ -2696,12 +2710,15 @@ heredoc_scan_done:
|
||||
|
||||
/* Check for ending label on the next line */
|
||||
if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
|
||||
if (IS_LABEL_START(YYCURSOR[heredoc_label->length])) {
|
||||
if (IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
|
||||
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
|
||||
if (PARSER_MODE()) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* newline before label will be subtracted from returned text, but
|
||||
@@ -2750,7 +2767,9 @@ nowdoc_scan_done:
|
||||
RETURN_TOKEN(END);
|
||||
}
|
||||
|
||||
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
|
||||
if (!SCNG(heredoc_scan_ahead)) {
|
||||
zend_error(E_COMPILE_WARNING, "Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
|
||||
}
|
||||
goto restart;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,11 @@ ZEND_API HashTable *zend_std_get_gc(zval *object, zval **table, int *n) /* {{{ *
|
||||
if (zobj->properties) {
|
||||
*table = NULL;
|
||||
*n = 0;
|
||||
if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)
|
||||
&& EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
|
||||
GC_DELREF(zobj->properties);
|
||||
zobj->properties = zend_array_dup(zobj->properties);
|
||||
}
|
||||
return zobj->properties;
|
||||
} else {
|
||||
*table = zobj->properties_table;
|
||||
@@ -1374,14 +1379,14 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_st
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void zend_intenal_class_init_statics(zend_class_entry *class_type) /* {{{ */
|
||||
ZEND_API void zend_class_init_statics(zend_class_entry *class_type) /* {{{ */
|
||||
{
|
||||
int i;
|
||||
zval *p;
|
||||
|
||||
if (!CE_STATIC_MEMBERS(class_type) && class_type->default_static_members_count) {
|
||||
if (class_type->parent) {
|
||||
zend_intenal_class_init_statics(class_type->parent);
|
||||
zend_class_init_statics(class_type->parent);
|
||||
}
|
||||
|
||||
#if ZTS
|
||||
@@ -1431,7 +1436,7 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (ce->type == ZEND_INTERNAL_CLASS) {
|
||||
zend_intenal_class_init_statics(ce);
|
||||
zend_class_init_statics(ce);
|
||||
} else {
|
||||
undeclared_property:
|
||||
if (!silent) {
|
||||
|
||||
@@ -175,6 +175,7 @@ extern const ZEND_API zend_object_handlers std_object_handlers;
|
||||
#define ZEND_PROPERTY_NOT_EMPTY ZEND_ISEMPTY /* Property is not empty */
|
||||
#define ZEND_PROPERTY_EXISTS 0x2 /* Property exists */
|
||||
|
||||
ZEND_API void zend_class_init_statics(zend_class_entry *ce);
|
||||
ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
|
||||
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);
|
||||
ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
|
||||
|
||||
+2
-1
@@ -43,7 +43,8 @@ ZEND_API void zend_object_std_dtor(zend_object *object)
|
||||
|
||||
if (object->properties) {
|
||||
if (EXPECTED(!(GC_FLAGS(object->properties) & IS_ARRAY_IMMUTABLE))) {
|
||||
if (EXPECTED(GC_DELREF(object->properties) == 0)) {
|
||||
if (EXPECTED(GC_DELREF(object->properties) == 0)
|
||||
&& EXPECTED(GC_TYPE(object->properties) != IS_NULL)) {
|
||||
zend_array_destroy(object->properties);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-6
@@ -41,6 +41,7 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_destroy(zend_objects_store *objec
|
||||
|
||||
ZEND_API void ZEND_FASTCALL zend_objects_store_call_destructors(zend_objects_store *objects)
|
||||
{
|
||||
EG(flags) |= EG_FLAGS_OBJECT_STORE_NO_REUSE;
|
||||
if (objects->top > 1) {
|
||||
uint32_t i;
|
||||
for (i = 1; i < objects->top; i++) {
|
||||
@@ -131,10 +132,10 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_put(zend_object *object)
|
||||
{
|
||||
int handle;
|
||||
|
||||
/* When in shutdown sequesnce - do not reuse previously freed handles, to make sure
|
||||
/* When in shutdown sequence - do not reuse previously freed handles, to make sure
|
||||
* the dtors for newly created objects are called in zend_objects_store_call_destructors() loop
|
||||
*/
|
||||
if (!(EG(flags) & EG_FLAGS_IN_SHUTDOWN) && EG(objects_store).free_list_head != -1) {
|
||||
if (EG(objects_store).free_list_head != -1 && EXPECTED(!(EG(flags) & EG_FLAGS_OBJECT_STORE_NO_REUSE))) {
|
||||
handle = EG(objects_store).free_list_head;
|
||||
EG(objects_store).free_list_head = GET_OBJ_BUCKET_NUMBER(EG(objects_store).object_buckets[handle]);
|
||||
} else {
|
||||
@@ -152,14 +153,17 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_put(zend_object *object)
|
||||
|
||||
ZEND_API void ZEND_FASTCALL zend_objects_store_del(zend_object *object) /* {{{ */
|
||||
{
|
||||
ZEND_ASSERT(GC_REFCOUNT(object) == 0);
|
||||
|
||||
/* GC might have released this object already. */
|
||||
if (UNEXPECTED(GC_TYPE(object) == IS_NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make sure we hold a reference count during the destructor call
|
||||
otherwise, when the destructor ends the storage might be freed
|
||||
when the refcount reaches 0 a second time
|
||||
*/
|
||||
ZEND_ASSERT(EG(objects_store).object_buckets != NULL);
|
||||
ZEND_ASSERT(IS_OBJ_VALID(EG(objects_store).object_buckets[object->handle]));
|
||||
ZEND_ASSERT(GC_REFCOUNT(object) == 0);
|
||||
|
||||
if (!(OBJ_FLAGS(object) & IS_OBJ_DESTRUCTOR_CALLED)) {
|
||||
GC_ADD_FLAGS(object, IS_OBJ_DESTRUCTOR_CALLED);
|
||||
|
||||
@@ -176,6 +180,8 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_del(zend_object *object) /* {{{ *
|
||||
uint32_t handle = object->handle;
|
||||
void *ptr;
|
||||
|
||||
ZEND_ASSERT(EG(objects_store).object_buckets != NULL);
|
||||
ZEND_ASSERT(IS_OBJ_VALID(EG(objects_store).object_buckets[object->handle]));
|
||||
EG(objects_store).object_buckets[handle] = SET_OBJ_INVALID(object);
|
||||
if (!(OBJ_FLAGS(object) & IS_OBJ_FREE_CALLED)) {
|
||||
GC_ADD_FLAGS(object, IS_OBJ_FREE_CALLED);
|
||||
|
||||
+2
-1
@@ -235,7 +235,8 @@ ZEND_API void destroy_zend_class(zval *zv)
|
||||
efree(ce->default_static_members_table);
|
||||
}
|
||||
ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) {
|
||||
if (prop_info->ce == ce || (prop_info->flags & ZEND_ACC_SHADOW)) {
|
||||
if (prop_info->ce == ce ||
|
||||
((prop_info->flags & ZEND_ACC_SHADOW) && prop_info->ce == ce->parent)) {
|
||||
zend_string_release_ex(prop_info->name, 0);
|
||||
if (prop_info->doc_comment) {
|
||||
zend_string_release_ex(prop_info->doc_comment, 0);
|
||||
|
||||
@@ -1193,12 +1193,18 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {
|
||||
|
||||
if (EXPECTED(op1 != op2)) {
|
||||
if (Z_TYPE_P(op1) == IS_ARRAY) {
|
||||
if (op1 == result) {
|
||||
zval_ptr_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0);
|
||||
}
|
||||
if (Z_TYPE_P(op2) == IS_ARRAY) {
|
||||
if (op1 == result) {
|
||||
zval_ptr_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, 1L);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
@@ -1206,6 +1212,9 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {
|
||||
}
|
||||
} else {
|
||||
if (Z_TYPE_P(op1) == IS_ARRAY) {
|
||||
if (op1 == result) {
|
||||
zval_ptr_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
|
||||
@@ -90,10 +90,10 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c
|
||||
ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end);
|
||||
|
||||
#if SIZEOF_ZEND_LONG == 4
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) > ZEND_LONG_MAX || (d) < ZEND_LONG_MIN))
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) > (double)ZEND_LONG_MAX || (d) < (double)ZEND_LONG_MIN))
|
||||
#else
|
||||
/* >= as (double)ZEND_LONG_MAX is outside signed range */
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) >= ZEND_LONG_MAX || (d) < ZEND_LONG_MIN))
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) >= (double)ZEND_LONG_MAX || (d) < (double)ZEND_LONG_MIN))
|
||||
#endif
|
||||
|
||||
#if ZEND_DVAL_TO_LVAL_CAST_OK
|
||||
|
||||
@@ -440,12 +440,8 @@ char *alloca();
|
||||
#define MAX(a, b) (((a)>(b))?(a):(b))
|
||||
#define MIN(a, b) (((a)<(b))?(a):(b))
|
||||
|
||||
/* x86 instructions BT, SHL, SHR don't require masking */
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) || defined(ZEND_WIN32)
|
||||
# define ZEND_BIT_TEST(bits, bit) (((bits)[(bit) / (sizeof((bits)[0])*8)] >> (bit)) & 1)
|
||||
#else
|
||||
# define ZEND_BIT_TEST(bits, bit) (((bits)[(bit) / (sizeof((bits)[0])*8)] >> ((bit) & (sizeof((bits)[0])*8-1))) & 1)
|
||||
#endif
|
||||
#define ZEND_BIT_TEST(bits, bit) \
|
||||
(((bits)[(bit) / (sizeof((bits)[0])*8)] >> ((bit) & (sizeof((bits)[0])*8-1))) & 1)
|
||||
|
||||
/* We always define a function, even if there's a macro or expression we could
|
||||
* alias, so that using it in contexts where we can't make function calls
|
||||
@@ -577,7 +573,7 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */
|
||||
# define ZEND_INTRIN_SSSE3_FUNC_DECL(func)
|
||||
#endif
|
||||
|
||||
#ifdef __SSE4_2__
|
||||
#if defined(HAVE_SSE4_2_DEF) || (defined(ZEND_WIN32) && defined(__SSE4_2__))
|
||||
/* Instructions compiled directly. */
|
||||
# define ZEND_INTRIN_SSE4_2_NATIVE 1
|
||||
#elif (defined(HAVE_FUNC_ATTRIBUTE_TARGET) && defined(PHP_HAVE_SSE4_2)) || defined(ZEND_WIN32)
|
||||
|
||||
+16
-5
@@ -328,13 +328,13 @@ void zend_signal_activate(void)
|
||||
|
||||
SIGG(active) = 1;
|
||||
SIGG(depth) = 0;
|
||||
SIGG(check) = ZEND_DEBUG;
|
||||
} /* }}} */
|
||||
|
||||
/* {{{ zend_signal_deactivate
|
||||
* */
|
||||
void zend_signal_deactivate(void)
|
||||
{
|
||||
|
||||
if (SIGG(check)) {
|
||||
size_t x;
|
||||
struct sigaction sa;
|
||||
@@ -342,21 +342,32 @@ void zend_signal_deactivate(void)
|
||||
if (SIGG(depth) != 0) {
|
||||
zend_error(E_CORE_WARNING, "zend_signal: shutdown with non-zero blocking depth (%d)", SIGG(depth));
|
||||
}
|
||||
|
||||
/* did anyone steal our installed handler */
|
||||
for (x = 0; x < sizeof(zend_sigs) / sizeof(*zend_sigs); x++) {
|
||||
sigaction(zend_sigs[x], NULL, &sa);
|
||||
if (sa.sa_sigaction != zend_signal_handler_defer) {
|
||||
if (sa.sa_sigaction != zend_signal_handler_defer &&
|
||||
sa.sa_sigaction != (void *) SIG_IGN) {
|
||||
zend_error(E_CORE_WARNING, "zend_signal: handler was replaced for signal (%d) after startup", zend_sigs[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SIGNAL_BEGIN_CRITICAL();
|
||||
SIGG(active) = 0;
|
||||
/* After active=0 is set, signal handlers will be called directly and other
|
||||
* state that is reset below will not be accessed. */
|
||||
*((volatile int *) &SIGG(active)) = 0;
|
||||
|
||||
SIGG(running) = 0;
|
||||
SIGG(blocked) = 0;
|
||||
SIGG(depth) = 0;
|
||||
SIGNAL_END_CRITICAL();
|
||||
|
||||
/* If there are any queued signals because of a missed unblock, drop them. */
|
||||
if (SIGG(phead) && SIGG(ptail)) {
|
||||
SIGG(ptail)->next = SIGG(pavail);
|
||||
SIGG(pavail) = SIGG(phead);
|
||||
SIGG(phead) = NULL;
|
||||
SIGG(ptail) = NULL;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -155,7 +155,12 @@ ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len)
|
||||
str->c = emalloc(SMART_STRING_START_LEN + 1);
|
||||
} else {
|
||||
str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OVERHEAD;
|
||||
str->c = emalloc_large(str->a + 1);
|
||||
if (EXPECTED(str->a < (ZEND_MM_CHUNK_SIZE - SMART_STRING_OVERHEAD))) {
|
||||
str->c = emalloc_large(str->a + 1);
|
||||
} else {
|
||||
/* allocate a huge chunk */
|
||||
str->c = emalloc(str->a + 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) {
|
||||
|
||||
+15
-1
@@ -234,7 +234,13 @@ static zend_string* ZEND_FASTCALL zend_new_interned_string_request(zend_string *
|
||||
}
|
||||
|
||||
/* Create a short living interned, freed after the request. */
|
||||
ZEND_ASSERT(!(GC_FLAGS(str) & GC_PERSISTENT));
|
||||
#if ZEND_RC_DEBUG
|
||||
if (zend_rc_debug) {
|
||||
/* PHP shouldn't create persistent interned string during request,
|
||||
* but at least dl() may do this */
|
||||
ZEND_ASSERT(!(GC_FLAGS(str) & GC_PERSISTENT));
|
||||
}
|
||||
#endif
|
||||
if (GC_REFCOUNT(str) > 1) {
|
||||
zend_ulong h = ZSTR_H(str);
|
||||
zend_string_delref(str);
|
||||
@@ -257,6 +263,7 @@ static zend_string* ZEND_FASTCALL zend_string_init_interned_permanent(const char
|
||||
return ret;
|
||||
}
|
||||
|
||||
ZEND_ASSERT(permanent);
|
||||
ret = zend_string_init(str, size, permanent);
|
||||
ZSTR_H(ret) = h;
|
||||
return zend_add_interned_string(ret, &interned_strings_permanent, IS_STR_PERMANENT);
|
||||
@@ -278,6 +285,13 @@ static zend_string* ZEND_FASTCALL zend_string_init_interned_request(const char *
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if ZEND_RC_DEBUG
|
||||
if (zend_rc_debug) {
|
||||
/* PHP shouldn't create persistent interned string during request,
|
||||
* but at least dl() may do this */
|
||||
ZEND_ASSERT(!permanent);
|
||||
}
|
||||
#endif
|
||||
ret = zend_string_init(str, size, permanent);
|
||||
ZSTR_H(ret) = h;
|
||||
|
||||
|
||||
+18
-2
@@ -89,6 +89,8 @@ static cwd_state main_cwd_state; /* True global */
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
#include "zend_globals.h"
|
||||
#include "zend_globals_macros.h"
|
||||
#endif
|
||||
|
||||
#define CWD_STATE_COPY(d, s) \
|
||||
@@ -857,6 +859,7 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
|
||||
tmp = do_alloca(len+1, use_heap);
|
||||
memcpy(tmp, path, len+1);
|
||||
|
||||
retry:
|
||||
if(save &&
|
||||
!(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
|
||||
(dataw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
|
||||
@@ -904,7 +907,21 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
|
||||
return (size_t)-1;
|
||||
}
|
||||
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {
|
||||
BY_HANDLE_FILE_INFORMATION fileInformation;
|
||||
|
||||
free_alloca(pbuffer, use_heap_large);
|
||||
if ((dataw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) &&
|
||||
(dataw.dwReserved0 & ~IO_REPARSE_TAG_CLOUD_MASK) == IO_REPARSE_TAG_CLOUD &&
|
||||
EG(windows_version_info).dwMajorVersion >= 10 &&
|
||||
EG(windows_version_info).dwMinorVersion == 0 &&
|
||||
EG(windows_version_info).dwBuildNumber >= 18362 &&
|
||||
GetFileInformationByHandle(hLink, &fileInformation) &&
|
||||
!(fileInformation.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
|
||||
dataw.dwFileAttributes = fileInformation.dwFileAttributes;
|
||||
CloseHandle(hLink);
|
||||
(*ll)--;
|
||||
goto retry;
|
||||
}
|
||||
free_alloca(tmp, use_heap);
|
||||
CloseHandle(hLink);
|
||||
FREE_PATHW()
|
||||
@@ -984,8 +1001,7 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
|
||||
}
|
||||
else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP ||
|
||||
/* Starting with 1709. */
|
||||
(pbuffer->ReparseTag & IO_REPARSE_TAG_CLOUD_MASK) != 0 && 0x90001018L != pbuffer->ReparseTag ||
|
||||
IO_REPARSE_TAG_CLOUD == pbuffer->ReparseTag ||
|
||||
(pbuffer->ReparseTag & ~IO_REPARSE_TAG_CLOUD_MASK) == IO_REPARSE_TAG_CLOUD ||
|
||||
IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag) {
|
||||
isabsolute = 1;
|
||||
substitutename = malloc((len + 1) * sizeof(char));
|
||||
|
||||
+18
-13
@@ -2430,6 +2430,11 @@ ZEND_VM_HOT_HELPER(zend_leave_helper, ANY, ANY)
|
||||
zend_clean_and_cache_symbol_table(EX(symbol_table));
|
||||
}
|
||||
EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
/* Free extra args before releasing the closure,
|
||||
* as that may free the op_array. */
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
|
||||
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
|
||||
zend_object *object = Z_OBJ(execute_data->This);
|
||||
#if 0
|
||||
@@ -2445,7 +2450,6 @@ ZEND_VM_HOT_HELPER(zend_leave_helper, ANY, ANY)
|
||||
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
old_execute_data = execute_data;
|
||||
execute_data = EX(prev_execute_data);
|
||||
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
|
||||
@@ -3157,6 +3161,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR,
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
FREE_UNFETCHED_OP2();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (OP2_TYPE != IS_CONST) {
|
||||
@@ -8506,7 +8511,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_IS_SMALLER_OR_EQUAL, (op1_info == MAY_BE_DOUB
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG_NO_OVERFLOW, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG_NO_OVERFLOW, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8519,7 +8524,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8532,7 +8537,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_INC_LONG_OR_DOUBLE, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_INC_LONG_OR_DOUBLE, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8549,7 +8554,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOU
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG_NO_OVERFLOW, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG_NO_OVERFLOW, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8562,7 +8567,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8575,7 +8580,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_DEC_LONG_OR_DOUBLE, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_DEC_LONG_OR_DOUBLE, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8592,7 +8597,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOU
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG_NO_OVERFLOW, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG_NO_OVERFLOW, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8603,7 +8608,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (res_info == MAY_BE_LONG && op1_inf
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8614,7 +8619,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == MAY_BE_LONG), ZEND_POS
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_INC_LONG_OR_DOUBLE, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_INC_LONG_OR_DOUBLE, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8630,7 +8635,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DO
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG_NO_OVERFLOW, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG_NO_OVERFLOW, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8641,7 +8646,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_inf
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8652,7 +8657,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == MAY_BE_LONG), ZEND_POS
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_DEC_LONG_OR_DOUBLE, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_DEC_LONG_OR_DOUBLE, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
+378
-358
@@ -541,6 +541,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
|
||||
zend_clean_and_cache_symbol_table(EX(symbol_table));
|
||||
}
|
||||
EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
/* Free extra args before releasing the closure,
|
||||
* as that may free the op_array. */
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
|
||||
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
|
||||
zend_object *object = Z_OBJ(execute_data->This);
|
||||
#if 0
|
||||
@@ -556,7 +561,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
|
||||
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
old_execute_data = execute_data;
|
||||
execute_data = EX(prev_execute_data);
|
||||
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
|
||||
@@ -5205,6 +5209,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST != IS_CONST) {
|
||||
@@ -7386,6 +7391,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
@@ -8619,6 +8625,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_UNUSED != IS_CONST) {
|
||||
@@ -10486,6 +10493,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV != IS_CONST) {
|
||||
@@ -11048,254 +11056,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE
|
||||
ZEND_VM_RETURN();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
@@ -23749,6 +23509,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST != IS_CONST) {
|
||||
@@ -26063,6 +25824,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
@@ -27622,6 +27384,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_UNUSED != IS_CONST) {
|
||||
@@ -30060,6 +29823,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV != IS_CONST) {
|
||||
@@ -32162,6 +31926,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST != IS_CONST) {
|
||||
@@ -33897,6 +33662,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
@@ -34435,6 +34201,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_UNUSED != IS_CONST) {
|
||||
@@ -36276,6 +36043,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV != IS_CONST) {
|
||||
@@ -38219,6 +37987,254 @@ type_check_resource:
|
||||
}
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_SIMPLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
@@ -55240,24 +55256,24 @@ ZEND_API void execute_ex(zend_execute_data *ex)
|
||||
(void*)&&ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_LABEL,
|
||||
(void*)&&ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST_LABEL,
|
||||
(void*)&&ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
@@ -55375,6 +55391,11 @@ zend_leave_helper_SPEC_LABEL:
|
||||
zend_clean_and_cache_symbol_table(EX(symbol_table));
|
||||
}
|
||||
EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
/* Free extra args before releasing the closure,
|
||||
* as that may free the op_array. */
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
|
||||
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
|
||||
zend_object *object = Z_OBJ(execute_data->This);
|
||||
#if 0
|
||||
@@ -55390,7 +55411,6 @@ zend_leave_helper_SPEC_LABEL:
|
||||
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
old_execute_data = execute_data;
|
||||
execute_data = EX(prev_execute_data);
|
||||
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
|
||||
@@ -56458,78 +56478,6 @@ zend_leave_helper_SPEC_LABEL:
|
||||
VM_TRACE(ZEND_YIELD_SPEC_CONST_CV)
|
||||
ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV)
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_SPEC_TMPVARCV)
|
||||
ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV)
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV)
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_SPEC_TMPVARCV)
|
||||
ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV)
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV)
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
@@ -59416,6 +59364,78 @@ zend_leave_helper_SPEC_LABEL:
|
||||
VM_TRACE(ZEND_TYPE_CHECK_SPEC_CV)
|
||||
ZEND_TYPE_CHECK_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV)
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_SPEC_CV)
|
||||
ZEND_POST_INC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV)
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV)
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_SPEC_CV)
|
||||
ZEND_POST_DEC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV)
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_SEND_VAR_SIMPLE_SPEC_CV):
|
||||
VM_TRACE(ZEND_SEND_VAR_SIMPLE_SPEC_CV)
|
||||
ZEND_SEND_VAR_SIMPLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
@@ -64739,24 +64759,24 @@ void zend_vm_init(void)
|
||||
ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
|
||||
ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
|
||||
ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER,
|
||||
ZEND_POST_INC_LONG_SPEC_CV_HANDLER,
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_SPEC_CV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_HANDLER,
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST_HANDLER,
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
|
||||
+15
-13
@@ -321,7 +321,7 @@ $op1_get_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "NULL",
|
||||
"CV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op2_get_zval_ptr_ptr_undef = array(
|
||||
@@ -332,7 +332,7 @@ $op2_get_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "NULL",
|
||||
"CV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op1_get_obj_zval_ptr = array(
|
||||
@@ -431,7 +431,7 @@ $op1_get_obj_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "&EX(This)",
|
||||
"CV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op2_get_obj_zval_ptr_ptr_undef = array(
|
||||
@@ -442,7 +442,7 @@ $op2_get_obj_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "&EX(This)",
|
||||
"CV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op1_free_op = array(
|
||||
@@ -1757,7 +1757,7 @@ function gen_executor_code($f, $spec, $kind, $prolog, &$switch_labels = array())
|
||||
gen_null_handler($f);
|
||||
break;
|
||||
case ZEND_VM_KIND_SWITCH:
|
||||
out($f,"default:\n");
|
||||
out($f,"default: ZEND_NULL_LABEL:\n");
|
||||
out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
|
||||
out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
|
||||
break;
|
||||
@@ -2069,7 +2069,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
|
||||
$prolog = $m[1];
|
||||
out($f,$prolog."if (UNEXPECTED(execute_data == NULL)) {\n");
|
||||
out($f,$prolog."\tstatic const void * const labels[] = {\n");
|
||||
gen_labels($f, $spec, ZEND_VM_KIND_GOTO, $prolog."\t\t", $specs);
|
||||
gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_GOTO : $kind, $prolog."\t\t", $specs);
|
||||
out($f,$prolog."\t};\n");
|
||||
out($f,$prolog."\tzend_opcode_handlers = (const void **) labels;\n");
|
||||
out($f,$prolog."\tzend_handlers_count = sizeof(labels) / sizeof(void*);\n");
|
||||
@@ -2184,7 +2184,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
|
||||
out($f,$prolog.$executor_name."_ex(NULL);\n");
|
||||
} else {
|
||||
out($f,$prolog."static const void * const labels[] = {\n");
|
||||
gen_labels($f, $spec, ZEND_VM_KIND_CALL, $prolog."\t", $specs, $switch_labels);
|
||||
gen_labels($f, $spec, ($kind == ZEND_VM_KIND_HYBRID) ? ZEND_VM_KIND_CALL : $kind, $prolog."\t", $specs, $switch_labels);
|
||||
out($f,$prolog."};\n");
|
||||
out($f,$prolog."static const uint32_t specs[] = {\n");
|
||||
gen_specs($f, $prolog."\t", $specs);
|
||||
@@ -2528,13 +2528,15 @@ function gen_vm($def, $skel) {
|
||||
|
||||
// Search for opcode handlers those are used by other opcode handlers
|
||||
foreach ($opcodes as $dsc) {
|
||||
if (preg_match("/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m", $dsc["code"], $m)) {
|
||||
$op = $m[1];
|
||||
if (!isset($opnames[$op])) {
|
||||
die("ERROR ($def:$lineno): Opcode with name '$op' is not defined.\n");
|
||||
if (preg_match_all("/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m", $dsc["code"], $mm, PREG_SET_ORDER)) {
|
||||
foreach ($mm as $m) {
|
||||
$op = $m[1];
|
||||
if (!isset($opnames[$op])) {
|
||||
die("ERROR ($def:$lineno): Opcode with name '$op' is not defined.\n");
|
||||
}
|
||||
$code = $opnames[$op];
|
||||
$opcodes[$code]['use'] = 1;
|
||||
}
|
||||
$code = $opnames[$op];
|
||||
$opcodes[$code]['use'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -2007,24 +2007,24 @@
|
||||
_(3850, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \
|
||||
_(3851, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \
|
||||
_(3852, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \
|
||||
_(3853, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3854, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3855, ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3856, ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3857, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3858, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3859, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3860, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3861, ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3862, ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3863, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3864, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3865, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV) \
|
||||
_(3866, ZEND_POST_INC_LONG_SPEC_TMPVARCV) \
|
||||
_(3867, ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV) \
|
||||
_(3868, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV) \
|
||||
_(3869, ZEND_POST_DEC_LONG_SPEC_TMPVARCV) \
|
||||
_(3870, ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV) \
|
||||
_(3853, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3854, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \
|
||||
_(3855, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3856, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \
|
||||
_(3857, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3858, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED) \
|
||||
_(3859, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3860, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \
|
||||
_(3861, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3862, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \
|
||||
_(3863, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3864, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED) \
|
||||
_(3865, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \
|
||||
_(3866, ZEND_POST_INC_LONG_SPEC_CV) \
|
||||
_(3867, ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV) \
|
||||
_(3868, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \
|
||||
_(3869, ZEND_POST_DEC_LONG_SPEC_CV) \
|
||||
_(3870, ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV) \
|
||||
_(3871, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \
|
||||
_(3872, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \
|
||||
_(3873, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \
|
||||
|
||||
+77
-44
@@ -395,6 +395,8 @@ AC_DEFUN([PHP_EVAL_LIBLINE],[
|
||||
$2="[$]$2 -pthread"
|
||||
else
|
||||
PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
|
||||
PHP_RUN_ONCE(EXTRA_LDFLAGS_PROGRAM, [$ac_i],
|
||||
[EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"])
|
||||
fi
|
||||
;;
|
||||
-l*[)]
|
||||
@@ -833,15 +835,11 @@ dnl from object_var in build-dir.
|
||||
dnl
|
||||
AC_DEFUN([PHP_SHARED_MODULE],[
|
||||
install_modules="install-modules"
|
||||
suffix=la
|
||||
|
||||
case $host_alias in
|
||||
*aix*[)]
|
||||
suffix=so
|
||||
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so'
|
||||
;;
|
||||
*[)]
|
||||
suffix=la
|
||||
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
|
||||
additional_flags="-Wl,-G"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -856,7 +854,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[
|
||||
\$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
|
||||
|
||||
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
|
||||
$link_cmd
|
||||
\$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
|
||||
|
||||
EOF
|
||||
])
|
||||
@@ -972,7 +970,7 @@ dnl ---------------------------------------------- Shared module
|
||||
dnl ---------------------------------------------- CLI static module
|
||||
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
|
||||
case "$PHP_SAPI" in
|
||||
cgi|embed[)]
|
||||
cgi|embed|phpdbg[)]
|
||||
PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,)
|
||||
EXT_STATIC="$EXT_STATIC $1;$ext_dir"
|
||||
;;
|
||||
@@ -2173,50 +2171,85 @@ AC_DEFUN([PHP_SETUP_ICU],[
|
||||
PHP_ICU_DIR=DEFAULT
|
||||
fi
|
||||
|
||||
if test "$PHP_ICU_DIR" = "DEFAULT"; then
|
||||
dnl Try to find icu-config
|
||||
AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
|
||||
else
|
||||
ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
|
||||
AC_MSG_CHECKING([for location of ICU headers and libraries])
|
||||
found_icu=no
|
||||
|
||||
dnl First try to find pkg-config
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for location of ICU headers and libraries])
|
||||
dnl If pkg-config is found try using it
|
||||
if test "$PHP_ICU_DIR" = "DEFAULT" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists icu-uc icu-io icu-i18n; then
|
||||
if $PKG_CONFIG --atleast-version=4.0 icu-uc; then
|
||||
found_icu=yes
|
||||
icu_version_full=`$PKG_CONFIG --modversion icu-uc`
|
||||
ac_IFS=$IFS
|
||||
IFS="."
|
||||
set $icu_version_full
|
||||
IFS=$ac_IFS
|
||||
icu_version=`expr [$]1 \* 1000 + [$]2`
|
||||
AC_MSG_RESULT([found $icu_version_full])
|
||||
|
||||
dnl Trust icu-config to know better what the install prefix is..
|
||||
icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
|
||||
if test "$?" != "0" || test -z "$icu_install_prefix"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
|
||||
else
|
||||
AC_MSG_RESULT([$icu_install_prefix])
|
||||
ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io icu-i18n`
|
||||
ICU_INCS=`$PKG_CONFIG --cflags-only-I icu-uc icu-io icu-i18n`
|
||||
ICU_CXXFLAGS=`$PKG_CONFIG --variable=CXXFLAGS icu-uc`
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
|
||||
|
||||
dnl Check ICU version
|
||||
AC_MSG_CHECKING([for ICU 4.0 or greater])
|
||||
icu_version_full=`$ICU_CONFIG --version`
|
||||
ac_IFS=$IFS
|
||||
IFS="."
|
||||
set $icu_version_full
|
||||
IFS=$ac_IFS
|
||||
icu_version=`expr [$]1 \* 1000 + [$]2`
|
||||
AC_MSG_RESULT([found $icu_version_full])
|
||||
AC_MSG_RESULT([found $ICU_VERSION])
|
||||
|
||||
if test "$icu_version" -lt "4000"; then
|
||||
AC_MSG_ERROR([ICU version 4.0 or later is required])
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
else
|
||||
AC_MSG_ERROR([ICU version 4.0 or later required.])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If pkg-config fails for some reason, revert to the old method
|
||||
if test "$found_icu" = "no"; then
|
||||
if test "$PHP_ICU_DIR" = "DEFAULT"; then
|
||||
dnl Try to find icu-config
|
||||
AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
|
||||
else
|
||||
ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
|
||||
fi
|
||||
|
||||
ICU_VERSION=$icu_version
|
||||
ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
dnl Trust icu-config to know better what the install prefix is..
|
||||
icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
|
||||
if test "$?" != "0" || test -z "$icu_install_prefix"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
|
||||
else
|
||||
AC_MSG_RESULT([$icu_install_prefix])
|
||||
|
||||
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
|
||||
if test "$icu_version" -ge "49000"; then
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
|
||||
ICU_CFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
|
||||
fi
|
||||
if test "$icu_version" -ge "60000"; then
|
||||
ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
|
||||
dnl Check ICU version
|
||||
AC_MSG_CHECKING([for ICU 4.0 or greater])
|
||||
icu_version_full=`$ICU_CONFIG --version`
|
||||
ac_IFS=$IFS
|
||||
IFS="."
|
||||
set $icu_version_full
|
||||
IFS=$ac_IFS
|
||||
icu_version=`expr [$]1 \* 1000 + [$]2`
|
||||
AC_MSG_RESULT([found $icu_version_full])
|
||||
|
||||
if test "$icu_version" -lt "4000"; then
|
||||
AC_MSG_ERROR([ICU version 4.0 or later is required])
|
||||
fi
|
||||
|
||||
ICU_VERSION=$icu_version
|
||||
ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
|
||||
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
|
||||
if test "$icu_version" -ge "49000"; then
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
|
||||
ICU_CFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
|
||||
fi
|
||||
if test "$icu_version" -ge "60000"; then
|
||||
ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set SDK_REMOTE=https://github.com/OSTC/php-sdk-binary-tools.git
|
||||
set SDK_REMOTE=https://github.com/Microsoft/php-sdk-binary-tools.git
|
||||
set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH%
|
||||
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=master
|
||||
)
|
||||
set STABILITY=staging
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
|
||||
rem SDK is cached, deps info is cached as well
|
||||
echo Updating dependencies in %DEPS_DIR%
|
||||
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% --crt %PHP_BUILD_CRT%
|
||||
|
||||
@@ -11,7 +11,7 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=master
|
||||
set STABILITY=staging
|
||||
)
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
|
||||
if not exist "%DEPS_DIR%" (
|
||||
echo "%DEPS_DIR%" doesn't exist
|
||||
exit /b 3
|
||||
@@ -27,7 +27,7 @@ set PDO_MYSQL_TEST_USER=%MYSQL_TEST_USER%
|
||||
set PDO_MYSQL_TEST_PASS=%MYSQL_PWD%
|
||||
set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
|
||||
set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
|
||||
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST% port=%PDO_MYSQL_TEST_PORT% dbname=test user=%PDO_MYSQL_TEST_USER% password=%MYSQL_PW%
|
||||
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST%;port=%PDO_MYSQL_TEST_PORT%;dbname=test;user=%PDO_MYSQL_TEST_USER%;password=%MYSQL_PW%
|
||||
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" --user=%MYSQL_TEST_USER% -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
@@ -58,7 +58,7 @@ rem set OPENSSL_CONF=
|
||||
rem set SSLEAY_CONF=
|
||||
|
||||
rem prepare for Opcache
|
||||
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enabled=1 -d opcache.enable_cli=1
|
||||
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1
|
||||
|
||||
rem prepare for enchant
|
||||
mkdir c:\enchant_plugins
|
||||
|
||||
+20
-2
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=2
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=12
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
@@ -565,6 +565,24 @@ PHP_CHECK_CPU_SUPPORTS([sse4.2])
|
||||
PHP_CHECK_CPU_SUPPORTS([avx])
|
||||
PHP_CHECK_CPU_SUPPORTS([avx2])
|
||||
|
||||
dnl The ABI of php_addslashes in PHP 7.3 is dependent on __SSE4_2__,
|
||||
dnl which depends on target attributes. Use this check to make sure that
|
||||
dnl SSE 4.2 availability during the PHP compilation is used, independently
|
||||
dnl of whether extensions are compiled with SSE 4.2 support.
|
||||
AC_MSG_CHECKING([whether __SSE4_2__ is defined])
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
int main() {
|
||||
#if defined(__SSE4_2__)
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
]])], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_SSE4_2_DEF, 1, [Define if __SSE4_2__ has been defined])
|
||||
], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([no])])
|
||||
|
||||
dnl Check for members of the stat structure
|
||||
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev])
|
||||
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exist
|
||||
|
||||
@@ -54,12 +54,19 @@ bc_num2long (num)
|
||||
/* Extract the int value, ignore the fraction. */
|
||||
val = 0;
|
||||
nptr = num->n_value;
|
||||
for (index=num->n_len; (index>0) && (val<=(LONG_MAX/BASE)); index--)
|
||||
val = val*BASE + *nptr++;
|
||||
for (index = num->n_len; index > 0; index--) {
|
||||
char n = *nptr++;
|
||||
|
||||
/* Check for overflow. If overflow, return zero. */
|
||||
if (index>0) val = 0;
|
||||
if (val < 0) val = 0;
|
||||
if (val > LONG_MAX/BASE) {
|
||||
return 0;
|
||||
}
|
||||
val *= BASE;
|
||||
|
||||
if (val > LONG_MAX - n) {
|
||||
return 0;
|
||||
}
|
||||
val += n;
|
||||
}
|
||||
|
||||
/* Return the value. */
|
||||
if (num->n_sign == PLUS)
|
||||
|
||||
@@ -123,6 +123,11 @@ static void com_write_dimension(zval *object, zval *offset, zval *value)
|
||||
|
||||
obj = CDNO_FETCH(object);
|
||||
|
||||
if (offset == NULL) {
|
||||
php_com_throw_exception(DISP_E_BADINDEX, "appending to variants is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
if (V_VT(&obj->v) == VT_DISPATCH) {
|
||||
ZVAL_COPY_VALUE(&args[0], offset);
|
||||
ZVAL_COPY_VALUE(&args[1], value);
|
||||
|
||||
@@ -184,7 +184,7 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
|
||||
}
|
||||
|
||||
const_name = php_com_olestring_to_string(bstr_ids, &len, codepage);
|
||||
c.name = zend_string_init(const_name, len, 1);
|
||||
c.name = zend_string_init(const_name, len, mode & CONST_PERSISTENT);
|
||||
// TODO: avoid reallocation???
|
||||
efree(const_name);
|
||||
if(c.name == NULL) {
|
||||
@@ -195,17 +195,17 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
|
||||
SysFreeString(bstr_ids);
|
||||
|
||||
/* sanity check for the case where the constant is already defined */
|
||||
php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage);
|
||||
if ((exists = zend_get_constant(c.name)) != NULL) {
|
||||
if (COMG(autoreg_verbose) && !compare_function(&results, &c.value, exists)) {
|
||||
php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", c.name);
|
||||
if (COMG(autoreg_verbose) && !compare_function(&results, &value, exists)) {
|
||||
php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", ZSTR_VAL(c.name));
|
||||
}
|
||||
zend_string_release_ex(c.name, 1);
|
||||
zend_string_release_ex(c.name, mode & CONST_PERSISTENT);
|
||||
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* register the constant */
|
||||
php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage);
|
||||
if (Z_TYPE(value) == IS_LONG) {
|
||||
ZEND_CONSTANT_SET_FLAGS(&c, mode, 0);
|
||||
ZVAL_LONG(&c.value, Z_LVAL(value));
|
||||
@@ -222,8 +222,8 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
|
||||
/* Type-library stuff */
|
||||
void php_com_typelibrary_dtor(zval *pDest)
|
||||
{
|
||||
ITypeLib **Lib = (ITypeLib**)Z_PTR_P(pDest);
|
||||
ITypeLib_Release(*Lib);
|
||||
ITypeLib *Lib = (ITypeLib*)Z_PTR_P(pDest);
|
||||
ITypeLib_Release(Lib);
|
||||
}
|
||||
|
||||
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #77578 (Crash when php unload)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
// To actually be able to verify the crash during shutdown on Windows, we have
|
||||
// to execute a PHP subprocess, and check its exit status.
|
||||
$php = PHP_BINARY;
|
||||
$ini = php_ini_loaded_file();
|
||||
$iniopt = $ini ? "-c $ini" : '';
|
||||
$command = "$php $iniopt -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\"";
|
||||
exec($command, $output, $status);
|
||||
var_dump($output, $status);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
int(0)
|
||||
===DONE===
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #77621 (Already defined constants are not properly reported)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
||||
?>
|
||||
--INI--
|
||||
com.autoregister_verbose=1
|
||||
--FILE--
|
||||
<?php
|
||||
define('ADSTYPE_INVALID', 0);
|
||||
$root = dirname(array_change_key_case($_SERVER, CASE_UPPER)['COMSPEC']);
|
||||
com_load_typelib("$root\activeds.tlb");
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: com_load_typelib(): Type library constant ADSTYPE_INVALID is already defined in %s on line %d
|
||||
===DONE===
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #78694 (Appending to a variant array causes segfault)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
foreach ([new com('WScript.Shell'), new variant([])] as $var) {
|
||||
try {
|
||||
$var[] = 42;
|
||||
} catch (com_exception $ex) {
|
||||
var_dump($ex->getMessage());
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
string(38) "appending to variants is not supported"
|
||||
string(38) "appending to variants is not supported"
|
||||
+12
-4
@@ -150,8 +150,6 @@ static void _php_curl_close_ex(php_curl *ch);
|
||||
static void _php_curl_close(zend_resource *rsrc);
|
||||
|
||||
|
||||
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
|
||||
|
||||
#define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s) - 1, (zend_long) v);
|
||||
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s) - 1, (double) v);
|
||||
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s) - 1, (char *) (v ? v : ""));
|
||||
@@ -1130,6 +1128,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x071306 /* Available since 7.19.6 */
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_CURLDEBUG);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_SSH_KNOWNHOSTS);
|
||||
#endif
|
||||
|
||||
@@ -1334,6 +1333,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x072f00 /* Available since 7.47.0 */
|
||||
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_2TLS);
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_PSL);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x073000 /* Available since 7.48.0 */
|
||||
@@ -1452,6 +1452,10 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_TLS13_CIPHERS);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x074001 /* Available since 7.64.1 */
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_ALTSVC);
|
||||
#endif
|
||||
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_SAFE_UPLOAD);
|
||||
|
||||
#ifdef PHP_CURL_NEED_OPENSSL_TSL
|
||||
@@ -3429,8 +3433,12 @@ PHP_FUNCTION(curl_error)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ch->err.str[CURL_ERROR_SIZE] = 0;
|
||||
RETURN_STRING(ch->err.str);
|
||||
if (ch->err.no) {
|
||||
ch->err.str[CURL_ERROR_SIZE] = 0;
|
||||
RETURN_STRING(ch->err.str);
|
||||
} else {
|
||||
RETURN_EMPTY_STRING();
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+7
-6
@@ -228,7 +228,7 @@ PHP_FUNCTION(curl_multi_select)
|
||||
}
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x071c00 /* Available since 7.28.0 */
|
||||
error = curl_multi_wait(mh->multi, NULL, 0, (unsigned long) timeout * 1000.0, &numfds);
|
||||
error = curl_multi_wait(mh->multi, NULL, 0, (unsigned long) (timeout * 1000.0), &numfds);
|
||||
if (CURLM_OK != error) {
|
||||
SAVE_CURLM_ERROR(mh, error);
|
||||
RETURN_LONG(-1);
|
||||
@@ -334,6 +334,7 @@ PHP_FUNCTION(curl_multi_info_read)
|
||||
CURLMsg *tmp_msg;
|
||||
int queued_msgs;
|
||||
zval *zmsgs_in_queue = NULL;
|
||||
php_curl *ch;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 2)
|
||||
Z_PARAM_RESOURCE(z_mh)
|
||||
@@ -371,6 +372,10 @@ PHP_FUNCTION(curl_multi_info_read)
|
||||
being done in add_assoc_resource */
|
||||
Z_ADDREF_P(pz_ch);
|
||||
|
||||
/* we must save result to be able to read error message */
|
||||
ch = (php_curl*)zend_fetch_resource(Z_RES_P(pz_ch), le_curl_name, le_curl);
|
||||
SAVE_CURL_ERROR(ch, tmp_msg->data.result);
|
||||
|
||||
/* add_assoc_resource automatically creates a new zval to
|
||||
wrap the "resource" represented by the current pz_ch */
|
||||
|
||||
@@ -420,6 +425,7 @@ void _php_curl_multi_close(zend_resource *rsrc) /* {{{ */
|
||||
curl_multi_cleanup(mh->multi);
|
||||
zend_llist_clean(&mh->easyh);
|
||||
if (mh->handlers->server_push) {
|
||||
zval_ptr_dtor(&mh->handlers->server_push->func_name);
|
||||
efree(mh->handlers->server_push);
|
||||
}
|
||||
if (mh->handlers) {
|
||||
@@ -577,11 +583,6 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
|
||||
|
||||
ZVAL_COPY(&mh->handlers->server_push->func_name, zvalue);
|
||||
mh->handlers->server_push->method = PHP_CURL_USER;
|
||||
if (!Z_ISUNDEF(mh->handlers->server_push->func_name)) {
|
||||
zval_ptr_dtor(&mh->handlers->server_push->func_name);
|
||||
mh->handlers->server_push->fci_cache = empty_fcall_info_cache;
|
||||
|
||||
}
|
||||
error = curl_multi_setopt(mh->multi, option, _php_server_push_callback);
|
||||
if (error != CURLM_OK) {
|
||||
return 0;
|
||||
|
||||
@@ -58,6 +58,8 @@ extern zend_module_entry curl_module_entry;
|
||||
#define PHP_CURL_RETURN 4
|
||||
#define PHP_CURL_IGNORE 7
|
||||
|
||||
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
|
||||
|
||||
extern int le_curl;
|
||||
#define le_curl_name "cURL handle"
|
||||
extern int le_curl_multi_handle;
|
||||
|
||||
@@ -17,6 +17,8 @@ const IGNORED_CONSTANTS = [
|
||||
'CURLOPT_PROGRESSDATA'
|
||||
];
|
||||
|
||||
const CONSTANTS_REGEX_PATTERN = '~^CURL(?:OPT|_VERSION)_[A-Z0-9_]+$~';
|
||||
|
||||
$curlConstants = getCurlConstants();
|
||||
$sourceConstants = getSourceConstants();
|
||||
|
||||
@@ -157,13 +159,8 @@ function getCurlConstants() : array
|
||||
$deprecated = $match[3] ?? null;
|
||||
$removed = $match[4] ?? null;
|
||||
|
||||
if (strpos($name, 'CURLOPT_') !== 0) {
|
||||
// not a CURLOPT_* constant
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($name, IGNORED_CONSTANTS)) {
|
||||
// purposefully ignored constant
|
||||
if (in_array($name, IGNORED_CONSTANTS, true) || !preg_match(CONSTANTS_REGEX_PATTERN, $name)) {
|
||||
// not a wanted constant
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -197,8 +194,8 @@ function getSourceConstants() : array
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($name, 'CURLOPT_') !== 0) {
|
||||
// not a CURLOPT_* constant
|
||||
if (!preg_match(CONSTANTS_REGEX_PATTERN, $name)) {
|
||||
// not a wanted constant
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
Request #72189 (Add missing CURL_VERSION_* constants)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
include 'skipif.inc';
|
||||
|
||||
$version = curl_version();
|
||||
|
||||
if ($version['version_number'] < 0x071306) {
|
||||
exit('skip: test works only with curl >= 7.19.6');
|
||||
}
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$version = curl_version();
|
||||
|
||||
$bitfields = [
|
||||
CURL_VERSION_ASYNCHDNS,
|
||||
CURL_VERSION_CONV,
|
||||
CURL_VERSION_CURLDEBUG,
|
||||
CURL_VERSION_DEBUG,
|
||||
CURL_VERSION_GSSNEGOTIATE,
|
||||
CURL_VERSION_IDN,
|
||||
CURL_VERSION_IPV6,
|
||||
CURL_VERSION_KERBEROS4,
|
||||
CURL_VERSION_LARGEFILE,
|
||||
CURL_VERSION_LIBZ,
|
||||
CURL_VERSION_NTLM,
|
||||
CURL_VERSION_SPNEGO,
|
||||
CURL_VERSION_SSL,
|
||||
CURL_VERSION_SSPI,
|
||||
];
|
||||
|
||||
$matchesCount = 0;
|
||||
|
||||
foreach ($bitfields as $feature) {
|
||||
if ($version['features'] & $feature) {
|
||||
++$matchesCount;
|
||||
}
|
||||
}
|
||||
|
||||
var_dump($matchesCount > 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
@@ -0,0 +1,77 @@
|
||||
--TEST--
|
||||
Bug #77535 (Invalid callback, h2 server push)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include 'skipif.inc';
|
||||
if (getenv("SKIP_ONLINE_TESTS")) {
|
||||
die("skip online test");
|
||||
}
|
||||
$curl_version = curl_version();
|
||||
if ($curl_version['version_number'] < 0x073d00) {
|
||||
exit("skip: test may crash with curl < 7.61.0");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
class MyHttpClient
|
||||
{
|
||||
private $mh;
|
||||
private $curl;
|
||||
|
||||
public function sendRequest()
|
||||
{
|
||||
if (false === $this->mh = curl_multi_init()) {
|
||||
throw new \RuntimeException('Unable to create a new cURL multi handle');
|
||||
}
|
||||
|
||||
$this->addServerPushCallback();
|
||||
|
||||
$this->curl = curl_init();
|
||||
curl_setopt($this->curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
|
||||
curl_setopt($this->curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
|
||||
curl_setopt($this->curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, false);
|
||||
curl_setopt($this->curl, CURLOPT_FAILONERROR, false);
|
||||
curl_setopt($this->curl, CURLOPT_URL, 'https://http2.golang.org/serverpush');
|
||||
curl_setopt($this->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
|
||||
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, function ($ch, $data) {
|
||||
return \strlen($data);
|
||||
});
|
||||
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
|
||||
return \strlen($data);
|
||||
});
|
||||
curl_multi_add_handle($this->mh, $this->curl);
|
||||
|
||||
$stillRunning = null;
|
||||
while (true) {
|
||||
do {
|
||||
$mrc = curl_multi_exec($this->mh, $stillRunning);
|
||||
} while (CURLM_CALL_MULTI_PERFORM === $mrc);
|
||||
|
||||
$info = curl_multi_info_read($this->mh);
|
||||
while (false !== $info && $info['msg'] == CURLMSG_DONE) {
|
||||
if (CURLMSG_DONE !== $info['msg']) {
|
||||
continue;
|
||||
}
|
||||
die("Start handle request.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function addServerPushCallback(): void
|
||||
{
|
||||
|
||||
$callback = static function () {
|
||||
return CURL_PUSH_OK;
|
||||
};
|
||||
|
||||
curl_multi_setopt($this->mh, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
|
||||
curl_multi_setopt($this->mh, CURLMOPT_PUSHFUNCTION, $callback);
|
||||
}
|
||||
}
|
||||
|
||||
$buzz = new MyHttpClient();
|
||||
$buzz->sendRequest();
|
||||
--EXPECT--
|
||||
Start handle request.
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
--TEST--
|
||||
Bug #77946 (Errored cURL resources returned by curl_multi_info_read() must be compatible with curl_errno() and curl_error())
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
if (!extension_loaded('curl')) {
|
||||
exit('skip curl extension not loaded');
|
||||
}
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$urls = array(
|
||||
'unknown://scheme.tld',
|
||||
);
|
||||
|
||||
$mh = curl_multi_init();
|
||||
|
||||
foreach ($urls as $i => $url) {
|
||||
$conn[$i] = curl_init($url);
|
||||
curl_multi_add_handle($mh, $conn[$i]);
|
||||
}
|
||||
|
||||
do {
|
||||
$status = curl_multi_exec($mh, $active);
|
||||
$info = curl_multi_info_read($mh);
|
||||
if (false !== $info) {
|
||||
var_dump($info['result']);
|
||||
var_dump(curl_errno($info['handle']));
|
||||
var_dump(curl_error($info['handle']));
|
||||
}
|
||||
} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
|
||||
|
||||
foreach ($urls as $i => $url) {
|
||||
curl_close($conn[$i]);
|
||||
}
|
||||
|
||||
curl_multi_close($mh);
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(1)
|
||||
int(1)
|
||||
string(%d) "Protocol %Sunknown%S not supported or disabled in libcurl"
|
||||
@@ -0,0 +1,34 @@
|
||||
--TEST--
|
||||
Bug #78775: TLS issues from HTTP request affecting other encrypted connections
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('curl')) die('skip Requires curl');
|
||||
if (getenv('SKIP_ONLINE_TESTS')) die('skip Online test');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$sock = fsockopen("tls://google.com", 443);
|
||||
|
||||
var_dump($sock);
|
||||
|
||||
$handle = curl_init('https://self-signed.badssl.com/');
|
||||
curl_setopt_array(
|
||||
$handle,
|
||||
[
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_SSL_VERIFYPEER => true,
|
||||
]
|
||||
);
|
||||
|
||||
var_dump(curl_exec($handle));
|
||||
curl_close($handle);
|
||||
|
||||
fwrite($sock, "GET / HTTP/1.0\n\n");
|
||||
var_dump(fread($sock, 8));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (stream)
|
||||
bool(false)
|
||||
string(8) "HTTP/1.0"
|
||||
Loaded 100 of 763 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user