Skip to content

Commit 506a291

Browse files
committed
Symbol-table writer: fix use of map key after erasure
This was revealed by re-enabling the OSX build, which evidently is quicker to re-use the memory formerly occupied by the pair<key, value>!
1 parent 99592b3 commit 506a291

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/symbol_table_writer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ class journalling_symbol_table_writert
124124

125125
void erase(const symbol_tablet::symbolst::const_iterator &entry)
126126
{
127+
const irep_idt entry_name=entry->first;
127128
base_symbol_table.erase(entry);
128-
on_remove(entry->first);
129+
on_remove(entry_name);
129130
}
130131

131132
void clear()

0 commit comments

Comments
 (0)