Skip to content

CHB: C-Expr: address of struct field array element not recognized #194

@sipma

Description

@sipma

with types:

typedef struct malloc_overflow_entry {
  uint32_t flags;
  uint32_t val1;
  uint32_t val2;
} malloc_overflow_ENTRY;

typedef struct malloc_overflow_buf {
  uint32_t flags;
  uint32_t size;
  malloc_overflow_ENTRY *entries;
} malloc_overflow_BUF;

the address of the indexed array element:

malloc_overflow_ENTRY* entry = &buf->entries[idx];

is not recognized and kept as:

entry = (buf->entries + ((idx + (idx << 1)) << 2));

test case: malloc_overflow_inner_O2_lifting_patched_bug_report_04_19

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions