Skip to content

Commit 6cdaac9

Browse files
committed
Commented out current free detector approach until better solution is found.
1 parent 0277811 commit 6cdaac9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/tests/metacall_test/source/metacall_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,17 @@ TEST_F(metacall_test, DefaultConstructor)
297297

298298
EXPECT_EQ((void *)NULL, (void *)metacallfv_s(metacall_function("multiply"), corrupted_args, 2));
299299

300-
/* Testing freed value input */
300+
/* Testing freed value input */
301301

302-
/* TODO: The next snippet of code works but address sanitizer warns about access warning,
302+
/* TODO: The next snippet of code works but address sanitizer warns about access warning,
303303
* because in order to check the magic number we need to access the pointer to the struct.
304304
* A better solution would be, when using a custom memory pool allocator (aka object pool)
305305
* detect if the pointer is allocated or not in the object pool, so we track it without
306306
* need to access the pointer in order to read it. This can be a better improvement but
307307
* for now, this would be sufficient to catch most of the errors.
308308
*/
309309

310+
/*
310311
void *freed_args[] = {
311312
(void *)metacall_value_create_long(3L),
312313
(void *)metacall_value_create_long(5L)
@@ -316,6 +317,7 @@ TEST_F(metacall_test, DefaultConstructor)
316317
metacall_value_destroy(freed_args[1]);
317318
318319
EXPECT_EQ((void *)NULL, (void *)metacallfv_s(metacall_function("multiply"), freed_args, 2));
320+
*/
319321
#endif
320322
}
321323
#endif /* OPTION_BUILD_LOADERS_PY */

0 commit comments

Comments
 (0)