public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/5] meson/cc: Disable memory-allocating builtins
@ 2019-05-09 10:03 Arkadiusz Hiler
  2019-05-09 10:03 ` [igt-dev] [PATCH i-g-t 2/5] lib/tests/igt_subtest_group: Operate within defined behavior Arkadiusz Hiler
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Arkadiusz Hiler @ 2019-05-09 10:03 UTC (permalink / raw)
  To: igt-dev

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@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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-05-10  8:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09 10:03 [igt-dev] [PATCH i-g-t 1/5] meson/cc: Disable memory-allocating builtins Arkadiusz Hiler
2019-05-09 10:03 ` [igt-dev] [PATCH i-g-t 2/5] lib/tests/igt_subtest_group: Operate within defined behavior Arkadiusz Hiler
2019-05-09 10:31   ` Ser, Simon
2019-05-09 11:11     ` Arkadiusz Hiler
2019-05-09 11:30       ` Ser, Simon
2019-05-09 10:03 ` [igt-dev] [PATCH i-g-t 3/5] runner_tests: " Arkadiusz Hiler
2019-05-09 10:43   ` Petri Latvala
2019-05-09 10:03 ` [igt-dev] [PATCH i-g-t 4/5] meson: Change the default build type to debugoptimized Arkadiusz Hiler
2019-05-09 10:03 ` [igt-dev] [PATCH i-g-t 5/5] meson: Use -D_FORTIFY_SOURCE=2 on optimized builds Arkadiusz Hiler
2019-05-09 11:37 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] meson/cc: Disable memory-allocating builtins Patchwork
2019-05-09 14:54 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-05-10  5:07   ` Arkadiusz Hiler
2019-05-09 20:35 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] meson/cc: Disable memory-allocating builtins (rev2) Patchwork
2019-05-10  4:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-05-10  8:28 ` [igt-dev] [PATCH i-g-t 1/5] meson/cc: Disable memory-allocating builtins Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox