[Openmp-commits] [libcxx] [openmp] [libc++] basic_ios<wchar_t> cannot store fill character WCHAR_MAX (PR #89305)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 18 14:46:31 PDT 2024


zeroomega wrote:

Hi, we saw a series of weird test failures on our mac stage2 builder after this patch was landed. And after hours of bisecting and we confirmed it was caused by this patch. The error message we saw on our bot:

```
FAIL: LLVM :: tools/llvm-debuginfo-analyzer/COFF/01-coff-print-basic-details.test (48643 of 54789)
******************** TEST 'LLVM :: tools/llvm-debuginfo-analyzer/COFF/01-coff-print-basic-details.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 21: /Volumes/Work/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/bin/llvm-debuginfo-analyzer --attribute=level,format                          --output-sort=offset                          --print=scopes,symbols,types,lines,instructions                          /Volumes/Work/s/w/ir/x/w/llvm-llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/COFF/Inputs/test-codeview-clang.o 2>&1 |  /Volumes/Work/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/bin/FileCheck --strict-whitespace -check-prefix=ONE /Volumes/Work/s/w/ir/x/w/llvm-llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/COFF/01-coff-print-basic-details.test
+ /Volumes/Work/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/bin/FileCheck --strict-whitespace -check-prefix=ONE /Volumes/Work/s/w/ir/x/w/llvm-llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/COFF/01-coff-print-basic-details.test
+ /Volumes/Work/s/w/ir/x/w/llvm_build/tools/clang/stage2-bins/bin/llvm-debuginfo-analyzer --attribute=level,format --output-sort=offset --print=scopes,symbols,types,lines,instructions /Volumes/Work/s/w/ir/x/w/llvm-llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/COFF/Inputs/test-codeview-clang.o
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/COFF/01-coff-print-basic-details.test:43:13: error: ONE-NEXT: expected string not found in input
; ONE-NEXT: [004]     5             {Line}
            ^
<stdin>:11:61: note: scanning from here
[004]                   {Variable} 'CONSTANT' -> 'const int'
                                                            ^
<stdin>:12:1: note: possible intended match here
[004] ����5             {Line}
^

Input file: <stdin>
Check file: /Volumes/Work/s/w/ir/x/w/llvm-llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/COFF/01-coff-print-basic-details.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
           6: [002]               {Function} extern not_inlined 'foo' -> 'int' 
           7: [003]                 {Parameter} 'ParamPtr' -> '* const int' 
           8: [003]                 {Parameter} 'ParamUnsigned' -> 'unsigned' 
           9: [003]                 {Parameter} 'ParamBool' -> 'bool' 
          10: [003]                 {Block} 
          11: [004]                   {Variable} 'CONSTANT' -> 'const int' 
next:43'0                                                                 X error: no match found
          12: [004] ����5             {Line} 
next:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:43'1     ?                               possible intended match
          13: [004]                   {Code} 'movl	$0x7, 0x4(%rsp)' 
next:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14: [004] ����6             {Line} 
next:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          15: [004]                   {Code} 'movl	$0x7, 0x1c(%rsp)' 
next:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          16: [004]                   {Code} 'jmp	0x8' 
next:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          17: [003]                 {TypeAlias} 'INTEGER' -> 'int' 
next:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           .
           .
           .
>>>>>>

--

********************
```

You can see that the clang emitted some non-readable characters in this unit test. It doesn't happen in this way before this PR was landed.

Our mac stage2 toolchain is linked against to the stage1 toolchain's libcxx, that probably explained why the stage1 builder is green but the test failed on stage2, since the stage1 toolchain used host toolchain's libcxx, which doesn't have this PR. The issue only happens on Mac, looks like Windows and Linux, are unaffected. 
Example bot run with this issue:  https://ci.chromium.org/ui/p/fuchsia/builders/prod/clang-mac-x64/b8742128214337927377/overview

Could you take a look please? If it takes a while to fix, could you revert this change and land it later?



https://github.com/llvm/llvm-project/pull/89305


More information about the Openmp-commits mailing list