qemu: fix UBSAN errors in tcg and arm translation
This commit is contained in:
@@ -46,8 +46,9 @@ static inline void gen_uc_tracecode(TCGContext *tcg_ctx, int32_t size, int32_t t
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
if (puc->hooks_count[type] == 1) {
|
const int hook_type = type & UC_HOOK_IDX_MASK;
|
||||||
cur = puc->hook[type].head;
|
if (puc->hooks_count[hook_type] == 1) {
|
||||||
|
cur = puc->hook[hook_type].head;
|
||||||
|
|
||||||
while (cur) {
|
while (cur) {
|
||||||
hk = cur->data;
|
hk = cur->data;
|
||||||
|
|||||||
@@ -7761,7 +7761,7 @@ static int t32_expandimm_rot(DisasContext *s, int x)
|
|||||||
/* Return the unrotated immediate from T32ExpandImm. */
|
/* Return the unrotated immediate from T32ExpandImm. */
|
||||||
static int t32_expandimm_imm(DisasContext *s, int x)
|
static int t32_expandimm_imm(DisasContext *s, int x)
|
||||||
{
|
{
|
||||||
int imm = extract32(x, 0, 8);
|
uint32_t imm = extract32(x, 0, 8);
|
||||||
|
|
||||||
switch (extract32(x, 8, 4)) {
|
switch (extract32(x, 8, 4)) {
|
||||||
case 0: /* XY */
|
case 0: /* XY */
|
||||||
|
|||||||
Reference in New Issue
Block a user