projects
/
profile
/
ivi
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8b66a0
)
tests: Make leak check work again by setting default visibility for malloc/free
author
Kristian Høgsberg
<krh@bitplanet.net>
Fri, 13 Apr 2012 14:13:49 +0000
(10:13 -0400)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Fri, 13 Apr 2012 14:13:49 +0000
(10:13 -0400)
We compile the test cases with -fvisibility=hidden which makes
our malloc/free wrappers fail to override system malloc/free.
tests/test-runner.c
patch
|
blob
|
history
diff --git
a/tests/test-runner.c
b/tests/test-runner.c
index
188f4cc
..
0bafc58
100644
(file)
--- a/
tests/test-runner.c
+++ b/
tests/test-runner.c
@@
-38,13
+38,15
@@
static void (*sys_free)(void*);
extern const struct test __start_test_section, __stop_test_section;
-void* malloc(size_t size)
+__attribute__ ((visibility("default"))) void *
+malloc(size_t size)
{
num_alloc++;
return sys_malloc(size);
}
-void free(void* mem)
+__attribute__ ((visibility("default"))) void
+free(void* mem)
{
if (mem != NULL)
num_alloc--;