I noticed that merge-string.s test fails under win32/vs2015 configuration. Patch fixes it, below are some details:
size_t is declared as:
typedef unsigned int size_t;
for that case.
When it was assigned to:
OutputOffset = Builder.add(Entry);
it value was 0xFFFFFFFF and not 0xFFFFFFFFFFFFFFFF like it supposed to be, but then it was added to offsets list:
S->Offsets.push_back(std::make_pair(Offset, OutputOffset));
where its value was converted to 0x00000000ffffffff since Offsets is a list of pairs: std::pair<uintX_t, uintX_t>
Later in code the next comparsion happened:
if (Base != uintX_t(-1)) //And it was not equal to -1 here as was expected
return Base + Addend; //This return worked when it should not.