[PATCH] Fix MCDataAtom never calling remap when adding data.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Oct 16 06:16:05 PDT 2013


Can this be tested via llvm-mc?

On 16 October 2013 04:54, Stephen Checkoway <s at pahtak.org> wrote:
> 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
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list