Page MenuHomePhabricator

[LLDB] Fix Read/Write memory to be compatible with both endians

Authored by mohit.bhakkad on Dec 22 2015, 10:37 PM.

Diff Detail


Event Timeline

mohit.bhakkad retitled this revision from to [LLDB] Fix Read/Write memory to be compatible with both endians.
mohit.bhakkad updated this object.
mohit.bhakkad added a reviewer: clayborg.
mohit.bhakkad set the repository for this revision to rL LLVM.
mohit.bhakkad added subscribers: jaydeep, bhushan, slthakur and 2 others.
tberghammer requested changes to this revision.Dec 23 2015, 2:57 AM
tberghammer added a reviewer: tberghammer.
tberghammer added a subscriber: tberghammer.
tberghammer added inline comments.
2549–2550 ↗(On Diff #43505)

This will be a buffer overrun if "size % sizeof(long) != 0" (and also violating strict aliasing). I suggest to use memcpy instead what fixes both of these issue.

2601 ↗(On Diff #43505)

Same here

This revision now requires changes to proceed.Dec 23 2015, 2:57 AM
mohit.bhakkad edited edge metadata.

Addressed comment.


I can't accept it on the UI because of some bug, but you can commit it without waiting for Greg.

This revision was automatically updated to reflect the committed changes.