From 615c7566c9753722d9b5fe0422e8e188ad91f2ba Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Wed, 8 May 2019 11:09:42 +0300 Subject: meson/cc: Disable memory-allocating builtins Disable the memory allocating builtins as they may cause unexpected behavior with our framework. They *may* get optimized out in favor of a register or stack variable, making them effectively local. Local variables do not play well with longjmp, which we use for fixtures and subtests. Signed-off-by: Arkadiusz Hiler Reviewed-by: Petri Latvala --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index cbc37f7e..c29b4c98 100644 --- a/meson.build +++ b/meson.build @@ -62,6 +62,12 @@ cc_args = [ '-Werror=sequence-point', '-Werror=trigraphs', '-Werror=write-strings', +# Disable the memory allocating builtins as they may cause unexpected behavior +# with our framework. They *may* get optimized out in favor of a register or +# stack variable, making them effectively local. Local variables do not play +# well with longjmp which is heavily used by IGT framework. + '-fno-builtin-malloc', + '-fno-builtin-calloc', ] foreach cc_arg : cc_args -- cgit v1.2.3