https://bugs.llvm.org/show_bug.cgi?id=47905
Bug ID: 47905
Summary: CFG regression in sqlite3 function tables after
cfd8481da1adba1952e0f6ecd00440986e49a946
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: dma...@mozilla.com
CC: andrew.pav...@microsoft.com, htmldevelo...@gmail.com,
llvm-bugs@lists.llvm.org, r...@google.com
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
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs