mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-11-05 18:14:50 +00:00
GCC 8 introduced the -Wstringop-truncation checker to detect truncation by the strncat and strncpy functions (closely related to -Wstringop-overflow, which detect buffer overflow by string-modifying functions declared in <string.h>). In tandem of -Wstringop-truncation, the "nonstring" attribute was added: The nonstring variable attribute specifies that an object or member declaration with type array of char, signed char, or unsigned char, or pointer to such a type is intended to store character arrays that do not necessarily contain a terminating NUL. This is useful in detecting uses of such arrays or pointers with functions that expect NUL-terminated strings, and to avoid warnings when such an array or pointer is used as an argument to a bounded string manipulation function such as strncpy. From the GCC manual: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-nonstring-variable-attribute Add the QEMU_NONSTRING macro which checks if the compiler supports this attribute. Backports commit 1daff2f8193496b0e5e0ab56dc48c570c81f804e from qemu |
||
|---|---|---|
| .. | ||
| atomic.h | ||
| atomic128.h | ||
| bitmap.h | ||
| bitops.h | ||
| bswap.h | ||
| compiler.h | ||
| cpuid.h | ||
| crc32c.h | ||
| cutils.h | ||
| fprintf-fn.h | ||
| host-utils.h | ||
| int128.h | ||
| log.h | ||
| mmap-alloc.h | ||
| module.h | ||
| osdep.h | ||
| queue.h | ||
| range.h | ||
| sys_membarrier.h | ||
| thread-posix.h | ||
| thread-win32.h | ||
| thread.h | ||
| timer.h | ||
| typedefs.h | ||
| units.h | ||
| xxhash.h | ||