projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d80e8e4
)
memory locations should not outlive executions
author
weiyu
<weiyuluo1232@gmail.com>
Tue, 20 Aug 2019 00:23:22 +0000
(17:23 -0700)
committer
weiyu
<weiyuluo1232@gmail.com>
Tue, 20 Aug 2019 00:23:22 +0000
(17:23 -0700)
classlist.h
patch
|
blob
|
history
history.h
patch
|
blob
|
history
diff --git
a/classlist.h
b/classlist.h
index 855f05fde23af696305e9cf28f271aa03c533b00..664301e9b5045c6dd51478e0b3e5f1cfb7e0bba4 100644
(file)
--- a/
classlist.h
+++ b/
classlist.h
@@
-26,6
+26,8
@@
typedef SnapList<uint32_t> func_id_list_t;
typedef SnapList<FuncInst *> func_inst_list_t;
typedef HSIterator<Predicate *, uintptr_t, 0, model_malloc, model_calloc, model_free> PredSetIter;
typedef HashSet<Predicate *, uintptr_t, 0, model_malloc, model_calloc, model_free> PredSet;
typedef SnapList<FuncInst *> func_inst_list_t;
typedef HSIterator<Predicate *, uintptr_t, 0, model_malloc, model_calloc, model_free> PredSetIter;
typedef HashSet<Predicate *, uintptr_t, 0, model_malloc, model_calloc, model_free> PredSet;
+typedef HSIterator<uint64_t, uint64_t, 0, model_malloc, model_calloc, model_free> write_set_iter;
+typedef HashSet<uint64_t, uint64_t, 0, model_malloc, model_calloc, model_free> write_set_t;
extern volatile int modellock;
#endif
extern volatile int modellock;
#endif
diff --git
a/history.h
b/history.h
index 2edf12a8c790d95f4ef56b18812220861cec4f7b..5f5e731840a647e73e70490b72b314d83d865fe7 100644
(file)
--- a/
history.h
+++ b/
history.h
@@
-7,7
+7,6
@@
#include "hashset.h"
#include "threads-model.h"
#include "hashset.h"
#include "threads-model.h"
-typedef HashSet<uint64_t, uint64_t, 0, model_malloc, model_calloc, model_free> write_set_t;
class ModelHistory {
public:
class ModelHistory {
public:
@@
-31,6
+30,7
@@
public:
uint64_t query_last_read(void * location, thread_id_t tid);
void add_to_write_history(void * location, uint64_t write_val);
uint64_t query_last_read(void * location, thread_id_t tid);
void add_to_write_history(void * location, uint64_t write_val);
+ HashTable<void *, write_set_t *, uintptr_t, 4> * getWriteHistory() { return &write_history; }
void print_write();
void print_func_node();
void print_write();
void print_func_node();
@@
-46,8
+46,8
@@
private:
ModelVector<FuncNode *> func_nodes;
ModelVector<FuncNode *> func_nodes;
- HashTable<void *, write_set_t *, uintptr_t, 4
, model_malloc, model_calloc, model_free
> write_history;
- HashSet<void *, uintptr_t, 4
, model_malloc, model_calloc, model_free
> write_locations;
+ HashTable<void *, write_set_t *, uintptr_t, 4> write_history;
+ HashSet<void *, uintptr_t, 4> write_locations;
};
#endif /* __HISTORY_H__ */
};
#endif /* __HISTORY_H__ */