tudasc/TypeART

calloc -- element count wrongly computed when type cannot be inferred (void*)

ahueck opened this issue · 0 comments

In the following code, TypeART calculates:

  • Element count: 10
  • Type: 0 (aka void*, as there is not cast)
void f() {
  void* pvd = calloc(10, sizeof(double));
}

Fix

Calculate 10 * sizeof(double) in the absence of a (primary) detectable bitcast.