[llvm-bugs] [Bug 32692] New: [UBSAN] Call to function (unknown) through pointer to incorrect function type
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 17 21:03:17 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32692
Bug ID: 32692
Summary: [UBSAN] Call to function (unknown) through pointer to
incorrect function type
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: ernest.galix at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18297
--> https://bugs.llvm.org/attachment.cgi?id=18297&action=edit
Source code
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...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170418/43492898/attachment.html>
More information about the llvm-bugs
mailing list