[igt-dev] [PATCH i-g-t 1/5] meson/cc: Disable memory-allocating builtins
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Thu May 9 10:03:22 UTC 2019
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 <arkadiusz.hiler at intel.com>
---
meson.build | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meson.build b/meson.build
index 8196ab63..2d54c28f 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
--
2.20.1
More information about the igt-dev
mailing list