fix some oss-fuzz (#1249)
* fix oss-fuzz 21012. * fix oss-fuzz 21741. * fix oss-fuzz 21743.
This commit is contained in:
@ -855,7 +855,7 @@ uint64_t HELPER(neon_qshl_u64)(CPUARMState *env, uint64_t val, uint64_t shiftop)
|
|||||||
if (tmp >= (ssize_t)sizeof(src1) * 8) { \
|
if (tmp >= (ssize_t)sizeof(src1) * 8) { \
|
||||||
if (src1) { \
|
if (src1) { \
|
||||||
SET_QC(); \
|
SET_QC(); \
|
||||||
dest = (uint32_t)(1 << (sizeof(src1) * 8 - 1)); \
|
dest = (uint32_t)(1U << (sizeof(src1) * 8 - 1)); \
|
||||||
if (src1 > 0) { \
|
if (src1 > 0) { \
|
||||||
dest--; \
|
dest--; \
|
||||||
} \
|
} \
|
||||||
|
@ -441,7 +441,7 @@ void glue(helper_pmaddwd, SUFFIX)(CPUX86State *env, Reg *d, Reg *s)
|
|||||||
#if SHIFT == 0
|
#if SHIFT == 0
|
||||||
static inline int abs1(int a)
|
static inline int abs1(int a)
|
||||||
{
|
{
|
||||||
if (a < 0) {
|
if (a < 0 && a != 0x80000000) {
|
||||||
return -a;
|
return -a;
|
||||||
} else {
|
} else {
|
||||||
return a;
|
return a;
|
||||||
|
@ -550,6 +550,9 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
|
|||||||
reset_all_temps(s, nb_temps);
|
reset_all_temps(s, nb_temps);
|
||||||
|
|
||||||
nb_ops = tcg_opc_ptr - s->gen_opc_buf;
|
nb_ops = tcg_opc_ptr - s->gen_opc_buf;
|
||||||
|
if (nb_ops > OPC_BUF_SIZE) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
gen_args = args;
|
gen_args = args;
|
||||||
for (op_index = 0; op_index < nb_ops; op_index++) {
|
for (op_index = 0; op_index < nb_ops; op_index++) {
|
||||||
TCGOpcode op = s->gen_opc_buf[op_index];
|
TCGOpcode op = s->gen_opc_buf[op_index];
|
||||||
|
Reference in New Issue
Block a user