<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body smarttemplateinserted="true">
    <div id="smartTemplate4-template">Hallo,<br>
    </div>
    <div><br>
    </div>
    <div>i tried to run my program under LLVM (from july fpc)  and it
      crashes?<br>
    </div>
    <div><br>
    </div>
    <div><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">Program
          received signal SIGSEGV, Segmentation fault. </span><br>
        <span style="color:#1818b2;background-color:#ffffff;">0x000000000042e5f1</span><span
          style="color:#000000;background-color:#ffffff;"> in </span><span
          style="color:#b26818;background-color:#ffffff;">SYSTEM_$$_SYSGETMEM_FIXED$QWORD$$POINTER</span><span
          style="color:#000000;background-color:#ffffff;"> () </span><br>
        (gdb) bt <br>
        #0  <span style="color:#1818b2;background-color:#ffffff;">0x000000000042e5f1</span><span
          style="color:#000000;background-color:#ffffff;"> in </span><span
          style="color:#b26818;background-color:#ffffff;">SYSTEM_$$_SYSGETMEM_FIXED$QWORD$$POINTER</span><span
          style="color:#000000;background-color:#ffffff;"> () </span><br>
        #1  <span style="color:#1818b2;background-color:#ffffff;">0x000000000041b92a</span><span
          style="color:#000000;background-color:#ffffff;"> in </span><span
          style="color:#b26818;background-color:#ffffff;">fpc_ansistr_setlength</span><span
          style="color:#000000;background-color:#ffffff;"> () </span><br>
        #2  <span style="color:#1818b2;background-color:#ffffff;">0x0000000000558d52</span><span
          style="color:#000000;background-color:#ffffff;"> in </span><span
          style="color:#b26818;background-color:#ffffff;">RESETBUFFER</span><span
          style="color:#000000;background-color:#ffffff;"> (</span><span
          style="color:#18b2b2;background-color:#ffffff;">ABUFFER</span><span
          style="color:#000000;background-color:#ffffff;">=0x7fffffffd560,
        </span><span style="color:#18b2b2;background-color:#ffffff;">BASECAPACITY</span><span
          style="color:#000000;background-color:#ffffff;">=130) at </span><span
          style="color:#18b218;background-color:#ffffff;">bbutils.pas</span><span
          style="color:#000000;background-color:#ffffff;">:1650 </span><br>
        #3  <span style="color:#b26818;background-color:#ffffff;">INIT</span><span
          style="color:#000000;background-color:#ffffff;"> (</span><span
          style="color:#18b2b2;background-color:#ffffff;">ABUFFER</span><span
          style="color:#000000;background-color:#ffffff;">=0x7fffffffd560,
        </span><span style="color:#18b2b2;background-color:#ffffff;">BASECAPACITY</span><span
          style="color:#000000;background-color:#ffffff;">=130, </span><span
          style="color:#18b2b2;background-color:#ffffff;">AENCODING</span><span
          style="color:#000000;background-color:#ffffff;">=65001) at </span><span
          style="color:#18b218;background-color:#ffffff;">bbutils.pas</span><span
          style="color:#000000;background-color:#ffffff;">:1639 </span><br>
        #4  <span style="color:#b26818;background-color:#ffffff;">STRDECODEHTMLENTITIES</span><span
          style="color:#000000;background-color:#ffffff;"> (</span><span
          style="color:#18b2b2;background-color:#ffffff;">result</span><span
          style="color:#000000;background-color:#ffffff;">=0x0, </span><span
          style="color:#18b2b2;background-color:#ffffff;">P</span><span
          style="color:#000000;background-color:#ffffff;">=<optimized
          out>, </span><span
          style="color:#18b2b2;background-color:#ffffff;">L</span><span
          style="color:#000000;background-color:#ffffff;">=130, </span><span
          style="color:#18b2b2;background-color:#ffffff;">ENCODING</span><span
          style="color:#000000;background-color:#ffffff;">=65001, </span><span
          style="color:#18b2b2;background-color:#ffffff;">FLAGS</span><span
          style="color:#000000;background-color:#ffffff;">=...) at </span><span
          style="color:#18b218;background-color:#ffffff;">bbutils.pas</span><span
          style="color:#000000;background-color:#ffffff;">:5527</span><br>
        <br>
        <br>
      </span></div>
    <div>anyone has seen sysgetmem crash before?<br>
    </div>
    <div><br>
    </div>
    <div><br>
    </div>
    <div>Perhaps that is exactly the kind of things ASAN was supposed to
      detect.<br>
    </div>
    <div><br>
    </div>
    <div>But with ASAN, I get an error somewhere entirely else. And I do
      not understand it, because the function is shown as ~ 5000 lines
      of assembly. <br>
    </div>
    <div><br>
    </div>
    <div>How can I see the mixed code with <span
        style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;"> disassemble
          /rm  </span></span>in gdb? I tried to call fpc -gl, -gs and
      -gw, and nothing helps<br>
    </div>
    <div><br>
    </div>
    <div><br>
    </div>
    <div>And there are a lot of weird ASAN calls for trivial movs. Like:<br>
    </div>
    <div><br>
    </div>
    <div><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">   </span><span
          style="color:#1818b2;background-color:#ffffff;">0x00000000006f577c</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22204>: 48 8b bb c8 00 00 00    </span><span
          style="color:#18b218;background-color:#ffffff;">mov</span><span
          style="color:#b2b2b2;background-color:#ffffff;">    </span><span
          style="color:#b21818;background-color:#ffffff;">rdi</span><span
          style="color:#000000;background-color:#ffffff;">,</span><span
          style="color:#b21818;background-color:#ffffff;">QWORD</span><span
          style="color:#b2b2b2;background-color:#ffffff;"> </span><span
          style="color:#b21818;background-color:#ffffff;">PTR</span><span
          style="color:#b2b2b2;background-color:#ffffff;"> </span><span
          style="color:#000000;background-color:#ffffff;">[</span><span
          style="color:#b21818;background-color:#ffffff;">rbx</span><span
style="font-decoration:underline;color:#ff5454;background-color:#ffffff;">+</span><span
          style="color:#1818b2;background-color:#ffffff;">0xc8</span><span
          style="color:#000000;background-color:#ffffff;">]
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f5783</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22211>: e8 18 cc d0 ff  </span><span
          style="color:#18b218;background-color:#ffffff;">call</span><span
          style="color:#b2b2b2;background-color:#ffffff;">   </span><span
          style="color:#1818b2;background-color:#ffffff;">0x4023a0</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
          style="color:#b21818;background-color:#ffffff;">__asan_report_load8@plt</span><span
          style="color:#000000;background-color:#ffffff;">>
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f5788</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22216>: e8 13 cc d0 ff  </span><span
          style="color:#18b218;background-color:#ffffff;">call</span><span
          style="color:#b2b2b2;background-color:#ffffff;">   </span><span
          style="color:#1818b2;background-color:#ffffff;">0x4023a0</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
          style="color:#b21818;background-color:#ffffff;">__asan_report_load8@plt</span><span
          style="color:#000000;background-color:#ffffff;">>
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f578d</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22221>: e8 0e cc d0 ff  </span><span
          style="color:#18b218;background-color:#ffffff;">call</span><span
          style="color:#b2b2b2;background-color:#ffffff;">   </span><span
          style="color:#1818b2;background-color:#ffffff;">0x4023a0</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
          style="color:#b21818;background-color:#ffffff;">__asan_report_load8@plt</span><span
          style="color:#000000;background-color:#ffffff;">>
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f5792</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22226>: e8 09 cc d0 ff  </span><span
          style="color:#18b218;background-color:#ffffff;">call</span><span
          style="color:#b2b2b2;background-color:#ffffff;">   </span><span
          style="color:#1818b2;background-color:#ffffff;">0x4023a0</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
          style="color:#b21818;background-color:#ffffff;">__asan_report_load8@plt</span><span
          style="color:#000000;background-color:#ffffff;">>
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f5797</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22231>: 48 89 c7        </span><span
          style="color:#18b218;background-color:#ffffff;">mov</span><span
          style="color:#b2b2b2;background-color:#ffffff;">    </span><span
          style="color:#b21818;background-color:#ffffff;">rdi</span><span
          style="color:#000000;background-color:#ffffff;">,</span><span
          style="color:#b21818;background-color:#ffffff;">rax</span><span
          style="color:#000000;background-color:#ffffff;">
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f579a</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22234>: e8 01 cc d0 ff  </span><span
          style="color:#18b218;background-color:#ffffff;">call</span><span
          style="color:#b2b2b2;background-color:#ffffff;">   </span><span
          style="color:#1818b2;background-color:#ffffff;">0x4023a0</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
          style="color:#b21818;background-color:#ffffff;">__asan_report_load8@plt</span><span
          style="color:#000000;background-color:#ffffff;">>
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f579f</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22239>: 48 89 cf        </span><span
          style="color:#18b218;background-color:#ffffff;">mov</span><span
          style="color:#b2b2b2;background-color:#ffffff;">    </span><span
          style="color:#b21818;background-color:#ffffff;">rdi</span><span
          style="color:#000000;background-color:#ffffff;">,</span><span
          style="color:#b21818;background-color:#ffffff;">rcx</span><span
          style="color:#000000;background-color:#ffffff;">
        </span><br>
          <span style="color:#1818b2;background-color:#ffffff;">0x00000000006f57a2</span><span
          style="color:#000000;background-color:#ffffff;">
          <+22242>: e8 09 ca d0 ff  </span><span
          style="color:#18b218;background-color:#ffffff;">call</span><span
          style="color:#b2b2b2;background-color:#ffffff;">   </span><span
          style="color:#1818b2;background-color:#ffffff;">0x4021b0</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
          style="color:#b21818;background-color:#ffffff;">__asan_report_store8@plt</span><span
          style="color:#000000;background-color:#ffffff;">></span><br>
        <br>
        <br>
      </span></div>
    <div>Are they supposed to be there?<br>
    </div>
    <div><br>
    </div>
    <div><br>
      Viele Grüße,<br>
      <p>Benito    <br>
      </p>
    </div>
    <p><br>
    </p>
  </body>
</html>