[PATCH] Fix MCDataAtom never calling remap when adding data.
Stephen Checkoway
s at pahtak.org
Wed Oct 16 01:54:54 PDT 2013
Revised patch also fixes the MCDataAtom ctor. It was inserting End - Begin 0s into Data. Now it's reserving End + 1 - Begin but inserting nothing. The test case is expanded to catch that too.
On Oct 16, 2013, at 2:40 AM, Stephen Checkoway <s at pahtak.org> wrote:
> The attached patch fixes a small mistake in MCDataAtom::addData() where it doesn't ever call remap():
>
> - if (Data.size() > Begin - End - 1)
> + if (Data.size() > End + 1 - Begin)
> remap(Begin, End + 1);
>
> I was unsure if such a simple fix needed a test or not, but the patch creates a new unittests/MC directory and adds a simple test.
>
> --
> Stephen Checkoway
>
>
> <MCDataAtom-size.diff>
--
Stephen Checkoway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MCDataAtom-size.diff
Type: application/octet-stream
Size: 3652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131016/0dfaa5c9/attachment.obj>
More information about the llvm-commits
mailing list