summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAchim Kriso <achim.kriso@student.kit.edu>2019-12-12 14:15:44 +0100
committerAndreas Fried <andreas.fried@kit.edu>2020-03-26 14:08:14 +0100
commit9f24b050d3edbc7929164a885e2c63ac19eceaaf (patch)
tree4f672057fee6c53fb5a9a3de48280a4a735ae179
parent9b4fc6a4f287bd24d7a0bf00b24a724c89597f27 (diff)
Pointer Parameter of add node can be on the right
-rw-r--r--ir/opt/lfasan.c6
-rw-r--r--runtime/lfmalloc/src/lfdebug.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/ir/opt/lfasan.c b/ir/opt/lfasan.c
index 6d92647..58898b8 100644
--- a/ir/opt/lfasan.c
+++ b/ir/opt/lfasan.c
@@ -428,9 +428,9 @@ static void insert_instrumentation(ir_node *irn, void * env) {
assert(pmap_contains(lf_map, left));
p_pred = left;
} else if (get_irn_mode(right) == get_modeP()) {
- panic("Pointer on the right!");
- //assert(pmap_contains(lf_map, right));
- //p_pred = right;
+ //panic("Pointer on the right!"); //Pointer apparently isn't always on the left
+ assert(pmap_contains(lf_map, right));
+ p_pred = right;
}
assert(p_pred != NULL);
lfptr_meta *add_meta = pmap_find(lf_map, left)->value;
diff --git a/runtime/lfmalloc/src/lfdebug.c b/runtime/lfmalloc/src/lfdebug.c
index 6c25e98..4fffde2 100644
--- a/runtime/lfmalloc/src/lfdebug.c
+++ b/runtime/lfmalloc/src/lfdebug.c
@@ -1,6 +1,6 @@
#include <stdbool.h>
#include <pthread.h>
-#include <threads.h>
+//#include <threads.h>
#include "lfdebug.h"
@@ -8,7 +8,8 @@
// This is used to allow lfmalloc call stdlib function which use malloc internally
// without creating an infinite recursion.
// Thread local to prevent race conditions.
-__thread bool lfmalloc_active = true;
+//__thread bool lfmalloc_active = true;
+bool lfmalloc_active = true;
void __disable_lf_alloc() {