<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CFG regression in sqlite3 function tables after cfd8481da1adba1952e0f6ecd00440986e49a946"
   href="https://bugs.llvm.org/show_bug.cgi?id=47905">47905</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CFG regression in sqlite3 function tables after cfd8481da1adba1952e0f6ecd00440986e49a946
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dmajor@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>andrew.paverd@microsoft.com, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, rnk@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>According to a comment in sqlite3, "Many system calls are accessed through
pointer-to-functions so that they may be overridden at runtime to facilitate
fault injection during testing and sandboxing."

This code pattern started being reported as an invalid call after
cfd8481da1adba1952e0f6ecd00440986e49a946:

t.c:

#include <windows.h>

typedef void (*sqlite3_syscall_ptr)(void);

sqlite3_syscall_ptr ptrs[] = { (sqlite3_syscall_ptr)GetSystemInfo, };

int main() {
  SYSTEM_INFO info;
  ((VOID(WINAPI*)(LPSYSTEM_INFO))ptrs[0])(&info);
  return 0;
}

Build with:
clang-cl -c -O2 -guard:cf t.c && lld-link -debug -guard:cf t.obj</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>