[m-rev.] diff: MR_label_goal_path fix
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed May 30 16:21:06 AEST 2001
runtime/mercury_stack_layout.h:
Fix a bug that could cause MR_label_goal_path to follow a garbage
pointer to the module layout structure, if the procedure has no
execution trace information.
Zoltan.
Index: runtime/mercury_stack_layout.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stack_layout.h,v
retrieving revision 1.49
diff -u -b -r1.49 mercury_stack_layout.h
--- runtime/mercury_stack_layout.h 2001/05/07 02:57:03 1.49
+++ runtime/mercury_stack_layout.h 2001/05/30 03:44:13
@@ -342,8 +342,11 @@
} MR_Label_Layout_No_Var_Info;
#define MR_label_goal_path(layout) \
- ((layout)->MR_sll_entry->MR_sle_module_layout->MR_ml_string_table \
- + (layout)->MR_sll_goal_path)
+ ((MR_ENTRY_LAYOUT_HAS_EXEC_TRACE((layout)->MR_sll_entry)) ? \
+ ((layout)->MR_sll_entry->MR_sle_module_layout \
+ ->MR_ml_string_table \
+ + (layout)->MR_sll_goal_path) \
+ : "")
#define MR_SHORT_COUNT_BITS 10
#define MR_SHORT_COUNT_MASK ((1 << MR_SHORT_COUNT_BITS) - 1)
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list