From 3ecee22a8a440b5f299729cbe49aede7e270c67c Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 24 Jun 2018 10:23:27 -0700 Subject: 4269 - start validating alloc-ids on lookup Seems incredible that this is all it took. Needs more testing. I also need to rethink how we organize our layers about addresses. Alloc-id stuff is scattered everywhere. The space for alloc-ids is perhaps unavoidably scattered. Just assume the layout from the start. But it seems bad that the scenario testing the lookup-time validation is in the 'abandon' layer when the code is in the 'lookup' layer. --- 035lookup.cc | 1 + 1 file changed, 1 insertion(+) (limited to '035lookup.cc') diff --git a/035lookup.cc b/035lookup.cc index 3b9ae6a2..02c2ab3f 100644 --- a/035lookup.cc +++ b/035lookup.cc @@ -102,6 +102,7 @@ void lookup_memory_core(reagent& x, bool check_for_null) { // validate alloc-id double alloc_id_in_address = get_or_insert(Memory, x.value); double alloc_id_in_payload = get_or_insert(Memory, new_value); +//? cerr << x.value << ": " << alloc_id_in_address << " vs " << new_value << ": " << alloc_id_in_payload << '\n'; if (alloc_id_in_address != alloc_id_in_payload) { raise << maybe(current_recipe_name()) << "address is already abandoned in '" << to_original_string(current_instruction()) << "'\n" << end(); dump_callstack(); -- cgit 1.4.1-2-gfad0