summaryrefslogtreecommitdiffstats
path: root/src/audit.c
diff options
context:
space:
mode:
authorJiri Olsa <Jiri Olsa jolsa@redhat.com>2012-02-09 16:37:00 +0100
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2012-02-09 16:37:00 +0100
commitfaa1cb9123d0686ea3f32b04c9a1e89fd3984e89 (patch)
tree05171e497415e8913e72ddb731a32c6b9d54a399 /src/audit.c
parent2849dc00038e6b18403ffae653c89ae0b835a14a (diff)
downloadlatrace-debug_firefox.tar.gz
latrace-debug_firefox.tar.xz
latrace-debug_firefox.zip
Diffstat (limited to 'src/audit.c')
-rw-r--r--src/audit.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/audit.c b/src/audit.c
index 97cbaf3..e942a58 100644
--- a/src/audit.c
+++ b/src/audit.c
@@ -41,6 +41,7 @@ static __thread int pipe_fd = 0;
static __thread int flow_below_stack = 0;
static __thread int indent_depth = 0;
+int check_malloc_hook(void);
static int check_names(char *name, char **ptr)
{
@@ -203,6 +204,12 @@ do { \
return ret; \
} while(0)
+#define CHECK_MALLOC_HOOK() \
+do { \
+ if (check_malloc_hook()) \
+ return -1; \
+} while(0)
+
unsigned int la_version(unsigned int v)
{
return v;
@@ -274,7 +281,7 @@ static unsigned int la_symbind(ElfW(Sym) *sym, const char *symname)
void la_activity(uintptr_t *cookie, unsigned int act)
{
- PRINT_VERBOSE(&cfg, 2, "%s\n", "entry");
+// PRINT_VERBOSE(&cfg, 2, "%s\n", "entry");
}
char* la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag)
@@ -323,6 +330,8 @@ pltenter(ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
do {
CHECK_DISABLED(sym->st_value);
+ CHECK_MALLOC_HOOK();
+
CHECK_PID(sym->st_value);
sym_entry(symname, (void*) sym->st_value,