[llvm-bugs] [Bug 48010] New: Json AST dumper invalid utf8

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 29 09:36:42 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=48010

            Bug ID: 48010
           Summary: Json AST dumper invalid utf8
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jonas at kamsker.at
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Used command: 
clang.exe -cc1 -ast-dump=json CSSender.cpp > ..\astout\cssender-02.ast

Possible reason:
Invalid UTF8 in comment (probable Korean)

Error Message:
CSSender.cpp:1:10: warning: non-portable path to file '"StdAfx.h"';
specified path differs in case from file name on disk
[-Wnonportable-include-path]
#include "stdafx.h"
          ^~~~~~~~~~
          "StdAfx.h"
In file included from CSSender.cpp:1:
./stdafx.h:17:10: fatal error: 'afxwin.h' file not found
#include <afxwin.h>         // MFC core and standard components
          ^~~~~~~~~~
Assertion failed: false && "Invalid UTF-8 in value used as JSON", file
C:\Users\Weirdo\source\repos\external\llvm-project\llvm\include\llvm/Support/JSON.h,
line 331
PLEASE submit a bug report to https://bugs.llvm.org/ and include the
crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments:
C:\Users\Weirdo\source\repos\external\llvm-project\build\Debug\bin\clang.exe
-cc1 -ast-dump=json CSSender.cpp
1.      <eof> parser at end of file
  #0 0x00007ff719161d8c HandleAbort
C:\Users\Weirdo\source\repos\external\llvm-project\llvm\lib\Support\Windows\Signals.inc:408:0
  #1 0x00007ffd4896c3e1 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6c3e1)
  #2 0x00007ffd4896e039 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6e039)
  #3 0x00007ffd48973c65 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x73c65)
  #4 0x00007ffd489737d7 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x737d7)
  #5 0x00007ffd48971841 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x71841)
  #6 0x00007ffd489741cf (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x741cf)
  #7 0x00007ff7191591f0 llvm::json::Value::Value(class llvm::StringRef)
C:\Users\Weirdo\source\repos\external\llvm-project\llvm\include\llvm\Support\JSON.h:331:0
  #8 0x00007ff71fc421ca clang::JSONNodeDumper::visitTextComment(class
clang::comments::TextComment const *,class clang::comments::FullComment
const *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\AST\JSONNodeDumper.cpp:1514:0
  #9 0x00007ff71fc6c531 clang::comments::CommentVisitorBase<struct
llvm::make_const_ptr,class clang::JSONNodeDumper,void,class
clang::comments::FullComment const *>::visit(class
clang::comments::Comment const *,class clang::comments::FullComment
const *)
C:\Users\Weirdo\source\repos\external\llvm-project\build\tools\clang\include\clang\AST\CommentNodes.inc:105:0
#10 0x00007ff71fc33a22 clang::JSONNodeDumper::Visit(class
clang::comments::Comment const *,class clang::comments::FullComment
const *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\AST\JSONNodeDumper.cpp:143:0
#11 0x00007ff71f85d7c5
<lambda_95475c341bc195c6ad18e824e0e1c15b>::operator()(void)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:225:0
#12 0x00007ff71f85df8c
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3>::operator()(bool)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:86:0
#13 0x00007ff71f84e345 std::invoke<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool>(class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1626:0
#14 0x00007ff71f846632 std::_Invoker_ret<void,1>::_Call<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool>(class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1641:0
#15 0x00007ff71f8b6bde std::_Func_impl_no_alloc<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3>,void,bool>::_Do_call(bool &&)
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:904:0
#16 0x00007ff71f85ffee
std::_Func_class<void,bool>::operator()(bool)const  C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:952:0
#17 0x00007ff71f85dfd6
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3>::operator()(bool)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:88:0
#18 0x00007ff71f84e345 std::invoke<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool>(class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1626:0
#19 0x00007ff71f846632 std::_Invoker_ret<void,1>::_Call<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool>(class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1641:0
#20 0x00007ff71f8b6bde std::_Func_impl_no_alloc<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3>,void,bool>::_Do_call(bool &&)
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:904:0
#21 0x00007ff71f85ffee
std::_Func_class<void,bool>::operator()(bool)const  C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:952:0
#22 0x00007ff71f85dfd6
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3>::operator()(bool)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:88:0
#23 0x00007ff71f84e345 std::invoke<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool>(class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1626:0
#24 0x00007ff71f846632 std::_Invoker_ret<void,1>::_Call<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool>(class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1641:0
#25 0x00007ff71f8b6bde std::_Func_impl_no_alloc<class
<lambda_bc167767016d418fcfd0cdfb3f1cbfb3>,void,bool>::_Do_call(bool &&)
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:904:0
#26 0x00007ff71f85ffee
std::_Func_class<void,bool>::operator()(bool)const  C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:952:0
#27 0x00007ff71f85ecc6
<lambda_d62a28ef375ab07499e6230f513874c6>::operator()(bool)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:88:0
#28 0x00007ff71f84e4d5 std::invoke<class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool>(class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1626:0
#29 0x00007ff71f8467c2 std::_Invoker_ret<void,1>::_Call<class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool>(class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1641:0
#30 0x00007ff71f8b6dbe std::_Func_impl_no_alloc<class
<lambda_d62a28ef375ab07499e6230f513874c6>,void,bool>::_Do_call(bool &&)
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:904:0
#31 0x00007ff71f85ffee
std::_Func_class<void,bool>::operator()(bool)const  C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:952:0
#32 0x00007ff71f83e1e8 clang::NodeStreamer::AddChild<class
<lambda_03e31fe8c541e4cec256685e3c51ce34> >(class llvm::StringRef,class
<lambda_03e31fe8c541e4cec256685e3c51ce34>)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:103:0
#33 0x00007ff71f83df72 clang::NodeStreamer::AddChild<class
<lambda_03e31fe8c541e4cec256685e3c51ce34> >(class
<lambda_03e31fe8c541e4cec256685e3c51ce34>)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:45:0
#34 0x00007ff71f861b75 clang::ASTNodeTraverser<class
clang::JSONDumper,class clang::JSONNodeDumper>::Visit(class clang::Decl
const *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:107:0
#35 0x00007ff71f8bc141 clang::ASTNodeTraverser<class
clang::JSONDumper,class clang::JSONNodeDumper>::dumpDeclContext(class
clang::DeclContext const *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:261:0
#36 0x00007ff71f858b75
<lambda_03e31fe8c541e4cec256685e3c51ce34>::operator()(void)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:106:0
#37 0x00007ff71f85ec7c
<lambda_d62a28ef375ab07499e6230f513874c6>::operator()(bool)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:86:0
#38 0x00007ff71f84e4d5 std::invoke<class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool>(class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1626:0
#39 0x00007ff71f8467c2 std::_Invoker_ret<void,1>::_Call<class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool>(class
<lambda_d62a28ef375ab07499e6230f513874c6> &,bool &&) C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\type_traits:1641:0
#40 0x00007ff71f8b6dbe std::_Func_impl_no_alloc<class
<lambda_d62a28ef375ab07499e6230f513874c6>,void,bool>::_Do_call(bool &&)
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:904:0
#41 0x00007ff71f85ffee
std::_Func_class<void,bool>::operator()(bool)const  C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\functional:952:0
#42 0x00007ff71f83e1e8 clang::NodeStreamer::AddChild<class
<lambda_03e31fe8c541e4cec256685e3c51ce34> >(class llvm::StringRef,class
<lambda_03e31fe8c541e4cec256685e3c51ce34>)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:103:0
#43 0x00007ff71f83df72 clang::NodeStreamer::AddChild<class
<lambda_03e31fe8c541e4cec256685e3c51ce34> >(class
<lambda_03e31fe8c541e4cec256685e3c51ce34>)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:45:0
#44 0x00007ff71f861b75 clang::ASTNodeTraverser<class
clang::JSONDumper,class clang::JSONNodeDumper>::Visit(class clang::Decl
const *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:107:0
#45 0x00007ff71f8bc141 clang::ASTNodeTraverser<class
clang::JSONDumper,class clang::JSONNodeDumper>::dumpDeclContext(class
clang::DeclContext const *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:261:0
#46 0x00007ff71f858b75
<lambda_03e31fe8c541e4cec256685e3c51ce34>::operator()(void)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:106:0
#47 0x00007ff71f83e024 clang::NodeStreamer::AddChild<class
<lambda_03e31fe8c541e4cec256685e3c51ce34> >(class llvm::StringRef,class
<lambda_03e31fe8c541e4cec256685e3c51ce34>)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:58:0
#48 0x00007ff71f83df72 clang::NodeStreamer::AddChild<class
<lambda_03e31fe8c541e4cec256685e3c51ce34> >(class
<lambda_03e31fe8c541e4cec256685e3c51ce34>)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:45:0
#49 0x00007ff71f861b75 clang::ASTNodeTraverser<class
clang::JSONDumper,class clang::JSONNodeDumper>::Visit(class clang::Decl
const *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:107:0
#50 0x00007ff71f8382c2 clang::Decl::dump(class llvm::raw_ostream
&,bool,enum clang::ASTDumpOutputFormat)const 
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\AST\ASTDumper.cpp:196:0
#51 0x00007ff71a6e0835 `anonymous namespace'::ASTPrinter::print
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\Frontend\ASTConsumers.cpp:98:0
#52 0x00007ff71a5b4d39 `anonymous
namespace'::ASTPrinter::HandleTranslationUnit
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\Frontend\ASTConsumers.cpp:48:0
#53 0x00007ff71d888866 clang::ParseAST(class clang::Sema &,bool,bool)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\Parse\ParseAST.cpp:178:0
#54 0x00007ff71a5049cb clang::ASTFrontendAction::ExecuteAction(void)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1058:0
#55 0x00007ff71a50435c clang::FrontendAction::Execute(void)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\Frontend\FrontendAction.cpp:953:0
#56 0x00007ff71a47c4c7 clang::CompilerInstance::ExecuteAction(class
clang::FrontendAction &)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:989:0
#57 0x00007ff71a6f8205 clang::ExecuteCompilerInvocation(class
clang::CompilerInstance *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:278:0
#58 0x00007ff714c0a293 cc1_main(class llvm::ArrayRef<char const *>,char
const *,void *)
C:\Users\Weirdo\source\repos\external\llvm-project\clang\tools\driver\cc1_main.cpp:240:0
#59 0x00007ff714bf4e35 ExecuteCC1Tool
C:\Users\Weirdo\source\repos\external\llvm-project\clang\tools\driver\driver.cpp:330:0
#60 0x00007ff714bf5750 main
C:\Users\Weirdo\source\repos\external\llvm-project\clang\tools\driver\driver.cpp:407:0
#61 0x00007ff72026ca69 invoke_main
D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
#62 0x00007ff72026c90e __scrt_common_main_seh
D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#63 0x00007ff72026c7ce __scrt_common_main
D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
#64 0x00007ff72026caf9 mainCRTStartup
D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
#65 0x00007ffdc6a97034 (C:\WINDOWS\System32\KERNEL32.DLL+0x17034)
#66 0x00007ffdc6bdcec1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x4cec1)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201029/373a60e8/attachment-0001.html>


More information about the llvm-bugs mailing list