This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][MSAN][test] Update buffersize for UTF-8 to C convert
ClosedPublic

Authored by jsji on Jul 13 2020, 2:12 PM.

Details

Summary

This is exposed by https://reviews.llvm.org/D83486.
When the host is UTF8, we may get n >10, causing assert failure.
Increase the buffersize to support UTF-8 to C conversion.

Diff Detail

Event Timeline

jsji created this revision.Jul 13 2020, 2:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2020, 2:12 PM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript
jsji added a reviewer: amyk.Jul 13 2020, 2:12 PM
vitalybuka accepted this revision.Jul 13 2020, 2:15 PM
This revision is now accepted and ready to land.Jul 13 2020, 2:15 PM
broadwaylamb added a comment.EditedJul 13 2020, 2:41 PM

Could you please explain why D83486 broke this test and what does PowerPC have to do with it? I’m just curious.

Ah, and thanks for fixing the issue!

This revision was automatically updated to reflect the committed changes.
jsji added a comment.EditedJul 13 2020, 3:17 PM

Could you please explain why D83486 broke this test and what does PowerPC have to do with it? I’m just curious.

Ah, and thanks for fixing the issue!

Actually, it has nothing to do with PowerPC, just happens on our bots.

D83486 change the lit test env, to use parent process env, which include locale setting, and our PowerPC bots have UTF-8 locale by default,
so when we call newlocale in this test, we get UTF-8 locale instead of C locale.

So when we call strxfrm_l we get n =20 > 10, so the tests assert in line 19..