« Previous | Next » 

Revision ecfee38a

IDecfee38aebe09f91d1affd82ca03581a2bba3662
Parent 631d30ea
Child 56ee7165

Added by KONRAD Frederic over 5 years ago

greenmemory: fix a comparison issue.

This fixes an issue where address bigger than int breaks lower_bound function.

This simple program made it crash:

gs::mem::sparse_mem<1024, unsigned char> mem;

void write_2_mem(unsigned int address, unsigned int len) {
for (unsigned int i = address; i < address + len; i++) {
mem[i] = rand();
}
}

int main(int argc, char** argv) {
write_2_mem(32768, 1);
write_2_mem(3369828, 1);
write_2_mem(2147483648, 1);
write_2_mem(0, 4);

return 0;
}

Signed-off-by: KONRAD Frederic <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences