(1) Bug fix... Check that rf is non-null before calling
r_modification
(2) Add a hook into assert mechanism for the debugger
{
model->print_summary();
}
+
+void assert_hook(void)
+{
+ printf("Add breakpoint to line %u in file %s.\n",__LINE__,__FILE__);
+}
#define DBG_ENABLED() (0)
#endif
+void assert_hook(void);
+
#define ASSERT(expr) \
do { \
if (!(expr)) { \
fprintf(stderr, "Error: assertion failed in %s at line %d\n", __FILE__, __LINE__); \
print_trace(); \
model_print_summary(); \
+ assert_hook(); \
exit(EXIT_FAILURE); \
} \
} while (0);
void print_trace(void);
void model_print_summary(void);
-
#endif /* __COMMON_H__ */
bool updated = false;
if (act->is_read()) {
- if (r_modification_order(act, act->get_reads_from()))
+ const ModelAction *rf = act->get_reads_from();
+ if (rf != NULL && r_modification_order(act, rf))
updated = true;
}
if (act->is_write()) {