[llvm-bugs] [Bug 32692] New: [UBSAN] Call to function (unknown) through pointer to incorrect function type
llvm-bugs at lists.llvm.org
Mon Apr 17 21:03:17 PDT 2017
Bug ID: 32692
Summary: [UBSAN] Call to function (unknown) through pointer to
incorrect function type
OS: Windows NT
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: ernest.galix at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18297
I have a program that dynamically links against a library.
The program passes a function pointer to that library, to execute.
But the ubsan (Undefined Behavior Sanitizer) specified that the pointer is on
an incorrect function type. And that occurs only
- if the callback function has a class as parameter
- if the callback function has a class as parameter, but only forward declared
- if I specify the compilation flags: -fvisibility=hidden.
I use clang to compile my project.
The attached code is reduced to a simple test case. Check the comments to see
where we can act to remove some warnings. But these fixes seem obvious.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs