gnu.cfg: Added support for xmalloc() and xcalloc(). Reference: https://gcc.gnu.org/onlinedocs/libiberty/Functions.html

This commit is contained in:
orbitcowboy 2019-02-28 22:36:52 +01:00
parent be6cec5ad8
commit e6d36913c8
1 changed files with 29 additions and 0 deletions

View File

@ -8,6 +8,35 @@
<alloc init="true" arg="1">asprintf</alloc>
<dealloc>free</dealloc>
</memory>
<memory>
<alloc init="false">xmalloc</alloc>
<alloc init="true">xcalloc</alloc>
<dealloc>free</dealloc>
</memory>
<!-- void * xmalloc(size_t size); -->
<function name="xmalloc">
<use-retval/>
<returnValue type="void *"/>
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
<valid>0:</valid>
</arg>
</function>
<!-- void * xcalloc(size_t nitems, size_t size); -->
<function name="xcalloc">
<use-retval/>
<noreturn>false</noreturn>
<returnValue type="void *"/>
<arg nr="1">
<not-uninit/>
<valid>1:</valid>
</arg>
<arg nr="2">
<not-uninit/>
<valid>0:</valid>
</arg>
</function>
<!-- http://man7.org/linux/man-pages/man3/asprintf.3.html -->
<!-- int asprintf(char **strp, const char *fmt, ...); -->
<function name="asprintf">