Skip to content

Commit e20979c

Browse files
committed
Disable corrupted memory tests when using sanitizers.
1 parent 622ac00 commit e20979c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/tests/metacall_test/source/metacall_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ TEST_F(metacall_test, DefaultConstructor)
280280

281281
metacall_value_destroy(ret);
282282

283+
#if !defined(__ADDRESS_SANITIZER__) && !defined(__THREAD_SANITIZER__) && !defined(__MEMORY_SANITIZER__)
283284
/* Testing corrupted value input */
284285
struct
285286
{
@@ -306,7 +307,6 @@ TEST_F(metacall_test, DefaultConstructor)
306307
* for now, this would be sufficient to catch most of the errors.
307308
*/
308309

309-
/*
310310
void *freed_args[] = {
311311
(void *)metacall_value_create_long(3L),
312312
(void *)metacall_value_create_long(5L)
@@ -316,7 +316,7 @@ TEST_F(metacall_test, DefaultConstructor)
316316
metacall_value_destroy(freed_args[1]);
317317

318318
EXPECT_EQ((void *)NULL, (void *)metacallfv_s(metacall_function("multiply"), freed_args, 2));
319-
*/
319+
#endif
320320
}
321321
#endif /* OPTION_BUILD_LOADERS_PY */
322322

0 commit comments

Comments
 (0)