StanfordPL / x64asm

x86-64 assembler library
Apache License 2.0
470 stars 60 forks source link

Mem::operator< broken #244

Closed bchurchill closed 6 years ago

bchurchill commented 6 years ago

Class Mem has operator< which is used for inserts into various data structures, like sets and maps. However, there exist objects a and b of class Mem where neither a < b, b < a, nor a == b. This happens when there's a memory reference like (%rdi) of size 8 and another (%rdi) of size 16. The parent class, Operand, has a correct operator< that works in all situations. The fix should be to just remove Mem's copy of this operator.

bchurchill commented 6 years ago

Fixed in 505ab5e4