<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Interesting.. not stacktrace?<br>
    <br>
    <div class="moz-cite-prefix">On 15/01/2020 01:38, Igor Gomon wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:MN2PR13MB36615F90CA819D7C746152A7FC370@MN2PR13MB3661.namprd13.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.gmail-m-4439422298999852875msolistparagraph, li.gmail-m-4439422298999852875msolistparagraph, div.gmail-m-4439422298999852875msolistparagraph
        {mso-style-name:gmail-m_-4439422298999852875msolistparagraph;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:480661246;
        mso-list-template-ids:-1;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal">Hi Stefan,</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I just tried it. Here is what I got:</p>
        <p class="MsoNormal">PS
          C:\Users\giv_u\source\repos\ConsoleApplication1\ConsoleApplication1>
          lli -jit-kind=orc-lazy .\ConsoleApplication1.bc</p>
        <p class="MsoNormal">Assertion failed: isa<X>(Val)
          && "cast<Ty>() argument of incompatible type!",
          file C:\dev\llvm-project\llvm\include\llvm/Support/Casting.h,
          line 264</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">--</p>
        <p class="MsoNormal">Thanks,</p>
        <p class="MsoNormal">Igor</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Sent from <a
            href="https://go.microsoft.com/fwlink/?LinkId=550986"
            moz-do-not-send="true">
            Mail</a> for Windows 10</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div
          style="mso-element:para-border-div;border:none;border-top:solid
          #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
          <p class="MsoNormal" style="border:none;padding:0in"><b>From:
            </b><a href="mailto:stefan.graenitz@gmail.com"
              moz-do-not-send="true">Stefan Gränitz</a><br>
            <b>Sent: </b>Tuesday, January 14, 2020 11:46 AM<br>
            <b>To: </b><a href="mailto:giv_ua@hotmail.com"
              moz-do-not-send="true">Igor Gomon</a><br>
            <b>Cc: </b><a href="mailto:dblaikie@gmail.com"
              moz-do-not-send="true">David Blaikie</a>; <a
              href="mailto:lhames@gmail.com" moz-do-not-send="true">
              Lang Hames</a>; <a href="mailto:llvm-dev@lists.llvm.org"
              moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
            <b>Subject: </b>Re: [llvm-dev] clang interpreter failed to
            materialize symbols</p>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">Hi Igor, not
          sure if that will work, but have you tried lli
          -jit-kind=orc-lazy ? The default is still MCJIT:<br>
          <a
href="https://github.com/llvm/llvm-project/blob/master/llvm/tools/lli/lli.cpp#L88"
            moz-do-not-send="true">https://github.com/llvm/llvm-project/blob/master/llvm/tools/lli/lli.cpp#L88</a><o:p></o:p></p>
        <div>
          <p class="MsoNormal">On 13/01/2020 19:07, David Blaikie via
            llvm-dev wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <div>
            <p class="MsoNormal">(+Lang for JIT/interpreter questions)<o:p></o:p></p>
          </div>
          <p class="MsoNormal"><o:p> </o:p></p>
          <div>
            <div>
              <p class="MsoNormal">On Sun, Jan 5, 2020 at 5:00 PM Igor
                Gomon via llvm-dev <<a
                  href="mailto:llvm-dev@lists.llvm.org"
                  moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
                wrote:<o:p></o:p></p>
            </div>
            <blockquote style="border:none;border-left:solid #CCCCCC
              1.0pt;padding:0in 0in 0in
              6.0pt;margin-left:4.8pt;margin-right:0in">
              <div>
                <div>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hello,</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> </p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I
                    am new to LLVM and what I am trying to do is to get
                    a very simple “hello-world” C++ program to compile
                    to LLVM IR and then to run it using lli tool.</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">So
                    here is the program code (hello.cpp):</p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">#include
                    <iostream></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">int
                    main (int argc, char *argv[])</p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">{</p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">   
                    std::cout << "Hello World!\n";</p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">   
                    return 0;</p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">}</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Below
                    are the steps I do to achieve that goal:</p>
                  <ol start="1" type="1">
                    <li
                      class="gmail-m-4439422298999852875msolistparagraph"
                      style="mso-list:l0 level1 lfo1">
                      clang++.exe hello.cpp -S -emit-llvm -o hello.ll
                      (produces hello.ll about 307KB in size)<o:p></o:p></li>
                    <li
                      class="gmail-m-4439422298999852875msolistparagraph"
                      style="mso-list:l0 level1 lfo1">
                      llvm-link.exe hello.ll -o hello.bc (produces the
                      bit-code file about 79KB in size).<o:p></o:p></li>
                    <li
                      class="gmail-m-4439422298999852875msolistparagraph"
                      style="mso-list:l0 level1 lfo1">
                      lli.exe hello.bc (terminates with a segmentation
                      fault). The dump is below.<o:p></o:p></li>
                  </ol>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> </p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I
                    understand that some symbols are not loaded (C++
                    standard library symbols). I am not sure how I can
                    specify the location of those symbols to lli tool (I
                    tried –extra-object option but no effect).</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Could
                    someone please let me know what am I missing or
                    doing wrong?
                  </p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Any
                    help is greatly appreciated!!!</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> </p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">--</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Igor</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> </p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Stack
                    dump:</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0.     
                    Program arguments:
                    C:\dev\llvm-project\build\Debug\bin\lli.exe
                    .\hello.bc</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x0000000000000000
                    (0x0000000000000010 0xCCCCCCCCCCCCCCCC
                    0x000000575B18D640 0x00007FF68DEF6186) <unknown
                    module></p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x000001AF8A3004F6
                    (0xCCCCCCCCCCCCCCCC 0x000000575B18D640
                    0x00007FF68DEF6186 0x000001AF8A4B0000) <unknown
                    module></p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x0000000000000010
                    (0x000000575B18D640 0x00007FF68DEF6186
                    0x000001AF8A4B0000 0xFFFFFFFFFFFFFFFE) <unknown
                    module></p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0xCCCCCCCCCCCCCCCC
                    (0x00007FF68DEF6186 0x000001AF8A4B0000
                    0xFFFFFFFFFFFFFFFE 0x000000575B18D6A0) <unknown
                    module></p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x000000575B18D640
                    (0x000001AF8A4B0000 0xFFFFFFFFFFFFFFFE
                    0x000000575B18D6A0 0x000001AF8A300032) <unknown
                    module></p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF68DEF6186
                    (0x000001AF8A85B410 0x000000575B18D678
                    0xCCCCCCCCCCCCCCCC 0x000001AF8A4B0000),
                    std::_Construct_in_place<std::_Container_proxy,std::_Container_base12
                    *>() + 0x56 bytes(s), C:\Program Files
                    (x86)\Microsoft Visual
                    Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\xmemory,
                    line 205</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF68DEF45E8
                    (0x0000000000000000 0x000000005B18D6B1
                    0xFFFFFFFFFFFFFFFE 0x000000575B18DB80),
std::_Container_base12::_Alloc_proxy<std::allocator<std::_Container_proxy>
                    >() + 0x58 bytes(s), C:\Program Files
                    (x86)\Microsoft Visual
                    Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\xmemory,
                    line 1100</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF68DF36634
                    (0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC
                    0xCCCCCCCCCCCCCCCC 0x0000000000000001),
std::vector<llvm::GenericValue,std::allocator<llvm::GenericValue>
>::vector<llvm::GenericValue,std::allocator<llvm::GenericValue>
                    >() + 0x54 bytes(s), C:\Program Files
                    (x86)\Microsoft Visual
                    Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vector,
                    line 446</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF68E06B048
                    (0x000001AF8A6A3058 0x0000000000000001
                    0xCCCCCCCCCCCCCCCC 0xCCCCCCCCCCCCCCCC),
                    llvm::APInt::getZExtValue() + 0x28 bytes(s),
                    C:\dev\llvm-project\llvm\include\llvm\ADT\APInt.h,
                    line 1589 + 0xA byte(s)</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF68ED9E0F0
                    (0x000001AF8A563310 0x000000575B18DB88
                    0x000001AF8A583F18 0x000000575B18DBC0),
                    llvm::MCJIT::runFunction() + 0x480 bytes(s),
                    C:\dev\llvm-project\llvm\lib\ExecutionEngine\MCJIT\MCJIT.cpp,
                    line 550 + 0x16 byte(s)</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF68EC09680
                    (0x000001AF8A563310 0x000001AF8A583F18
                    0x00007FF6920964A0 0x000001AF8A532460),
                    llvm::ExecutionEngine::runFunctionAsMain() + 0x410
                    bytes(s),
                    C:\dev\llvm-project\llvm\lib\ExecutionEngine\ExecutionEngine.cpp,
                    line 470 + 0x65 byte(s)</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF68DEE4200
                    (0x0000000000000002 0x000001AF8A5515B0
                    0x000001AF8A532460 0x00007FF6909C0A7D), main() +
                    0x1D10 bytes(s),
                    C:\dev\llvm-project\llvm\tools\lli\lli.cpp, line 614
                    + 0x4D byte(s)</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF6909C1A29
                    (0x00007FF690C2C000 0x00007FF690C2FE30
                    0x0000000000000000 0x0000000000000000),
                    invoke_main() + 0x39 bytes(s),
                    d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl,
                    line 79</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF6909C190E
                    (0x0000000000000000 0x0000000000000000
                    0x0000000000000000 0x0000000000000000),
                    __scrt_common_main_seh() + 0x12E bytes(s),
                    d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl,
                    line 288 + 0x5 byte(s)</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF6909C17CE
                    (0x0000000000000000 0x0000000000000000
                    0x0000000000000000 0x0000000000000000),
                    __scrt_common_main() + 0xE bytes(s),
                    d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl,
                    line 331</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FF6909C1AB9
                    (0x0000000000000000 0x0000000000000000
                    0x0000000000000000 0x0000000000000000),
                    mainCRTStartup() + 0x9 bytes(s),
                    d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp,
                    line 17</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FFC76417BD4
                    (0x0000000000000000 0x0000000000000000
                    0x0000000000000000 0x0000000000000000),
                    BaseThreadInitThunk() + 0x14 bytes(s)</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">0x00007FFC7746CED1
                    (0x0000000000000000 0x0000000000000000
                    0x0000000000000000 0x0000000000000000),
                    RtlUserThreadStart() + 0x21 bytes(s)</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> </p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Sent
                    from
                    <a
                      href="https://go.microsoft.com/fwlink/?LinkId=550986"
                      target="_blank" moz-do-not-send="true">Mail</a>
                    for Windows 10</p>
                  <p class="MsoNormal"
                    style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> </p>
                </div>
              </div>
              <p class="MsoNormal">_______________________________________________<br>
                LLVM Developers mailing list<br>
                <a href="mailto:llvm-dev@lists.llvm.org" target="_blank"
                  moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
                <a
                  href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
                  target="_blank" moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
            </blockquote>
          </div>
          <p class="MsoNormal"><br>
            <br>
            <o:p></o:p></p>
          <pre>_______________________________________________</pre>
          <pre>LLVM Developers mailing list</pre>
          <pre><a href="mailto:llvm-dev@lists.llvm.org" moz-do-not-send="true">llvm-dev@lists.llvm.org</a></pre>
          <pre><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></pre>
        </blockquote>
        <pre>-- </pre>
        <pre><a href="https://flowcrypt.com/pub/stefan.graenitz@gmail.com" moz-do-not-send="true">https://flowcrypt.com/pub/stefan.graenitz@gmail.com</a></pre>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";color:black"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="https://flowcrypt.com/pub/stefan.graenitz@gmail.com">https://flowcrypt.com/pub/stefan.graenitz@gmail.com</a></pre>
  </body>
</html>