diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-12-27 21:27:41 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-12-27 21:27:41 +0300 |
commit | 16ffd18660fdf09ce2f671a2e3e8245242c94607 (patch) | |
tree | 9138f61bc0b0266a421d729236bc7958abdbb2d9 /mallocx.c | |
parent | eca62c130353147121431b5893f11246de001269 (diff) | |
download | bdwgc-16ffd18660fdf09ce2f671a2e3e8245242c94607.tar.gz |
Declare cleared_p as volatile in realloc for any GCC version
(fix of commit eca62c130)
Issue #406 (bdwgc).
* mallocx.c [_FORTIFY_SOURCE && !__clang__] (GC_realloc): Declare
cleared_p variable as volatile for any GCC version.
Diffstat (limited to 'mallocx.c')
-rw-r--r-- | mallocx.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -79,7 +79,7 @@ GC_API void * GC_CALL GC_realloc(void * p, size_t lb) struct hblk * h; hdr * hhdr; void * result; -# if defined(_FORTIFY_SOURCE) && GC_GNUC_PREREQ(9, 0) && !defined(__clang__) +# if defined(_FORTIFY_SOURCE) && defined(__GNUC__) && !defined(__clang__) volatile /* Use cleared_p instead of p as a workaround to avoid */ /* passing alloc_size(lb) attribute associated with p */ /* to memset (including memset call inside GC_free). */ |