Open
Description
For the following code:
_Itype_for_any(T) void *malloc(unsigned long size) : itype(_Array_ptr<T>) byte_count(size);
_Itype_for_any(T) void *vsf_sysutil_malloc(unsigned int size) : itype(_Array_ptr<T>) byte_count(size);
void *vsf_sysutil_malloc(unsigned int size)
{
void *p_ret;
p_ret = malloc(size);
return p_ret;
}
We wrongly convert the above example to be the following:
_Itype_for_any(T) void *malloc(unsigned long size) : itype(_Array_ptr<T>) byte_count(size);
void *vsf_sysutil_malloc(unsigned int size) : itype(_Array_ptr<void>) : itype(_Array_ptr<T>) byte_count(size);
void *vsf_sysutil_malloc(unsigned int size) : itype(_Array_ptr<void>)
{
void *p_ret;
p_ret = malloc(size);
return p_ret;
}
Here, the problem is we treating the generic type as a regular itype
which is wrong.