Skip to content

Commit a839230

Browse files
ellertiluuu1994
authored andcommitted
Fix compilation on RHEL 7 ppc64le (gcc 4.8)
Fixes GH-10077 Closes GH-10078
1 parent 8a221e2 commit a839230

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ PHP NEWS
211211
- Hash:
212212
. Fixed bug #81738: buffer overflow in hash_update() on long parameter.
213213
(CVE-2022-37454) (nicky at mouha dot be)
214+
. Fixed bug GH-10077: Fix compilation on RHEL 7 ppc64le. (Mattias Ellert)
214215

215216
- Intl:
216217
. Update all grandfathered language tags with preferred values

ext/hash/xxhash/xxhash.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4129,7 +4129,7 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
41294129
const void* XXH_RESTRICT secret)
41304130
{
41314131
/* presumed aligned */
4132-
unsigned long long* const xacc = (unsigned long long*) acc;
4132+
unsigned int* const xacc = (unsigned int*) acc;
41334133
xxh_u64x2 const* const xinput = (xxh_u64x2 const*) input; /* no alignment restriction */
41344134
xxh_u64x2 const* const xsecret = (xxh_u64x2 const*) secret; /* no alignment restriction */
41354135
xxh_u64x2 const v32 = { 32, 32 };
@@ -4145,7 +4145,7 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
41454145
/* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */
41464146
xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled);
41474147
/* acc_vec = xacc[i]; */
4148-
xxh_u64x2 acc_vec = vec_xl(0, xacc + 2 * i);
4148+
xxh_u64x2 acc_vec = (xxh_u64x2)vec_xl(0, xacc + 4 * i);
41494149
acc_vec += product;
41504150

41514151
/* swap high and low halves */
@@ -4155,7 +4155,7 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
41554155
acc_vec += vec_xxpermdi(data_vec, data_vec, 2);
41564156
#endif
41574157
/* xacc[i] = acc_vec; */
4158-
vec_xst(acc_vec, 0, xacc + 2 * i);
4158+
vec_xst((xxh_u32x4)acc_vec, 0, xacc + 4 * i);
41594159
}
41604160
}
41614161

0 commit comments

Comments
 (0)