[llvm] r201811 - [Support] Correctly handle zero length inputs to UTF conversion functions on Windows.

Michael Spencer bigcheesegs at gmail.com
Fri Feb 21 14:13:21 PST 2014


On Thu, Feb 20, 2014 at 7:16 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:
> On Thu, Feb 20, 2014 at 6:07 PM, Chandler Carruth <chandlerc at google.com> wrote:
>>
>> On Thu, Feb 20, 2014 at 4:46 PM, Gao, Yunzhong
>> <yunzhong_gao at playstation.sony.com> wrote:
>>>
>>> I do have a script that demonstrates the problem, but I am not sure
>>> whether it is possible to convert it into a regression test
>>> case (Any advice on this?).
>>
>>
>> Why can't we use unit testing the way we routinely do for Support libraries
>> precisely because the failure is typically too far from the error to make
>> regression testing useful?
>
> Ah, the obvious solution. I'll add a regression test.
>
> - Michael Spencer

So, we can't directly test UTFxToUTFx() because it's not exposed in a
header, as it's private to Windows support stuff. And we can't test it
through GetArgumentVector() because it ignores the input arguments on
Windows (because it has to get the Unicode arguments).

Not really sure how to test this without either exposing UTFxToUTFx(),
or unifying our different Unicode utilities.

- Michael Spencer



More information about the llvm-commits mailing list