[llvm-bugs] [Bug 40166] New: Pointer to a hidden function alias, when obtained across a DSO boundary at -O > 0, calls the visible version of the symbol
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Dec 27 05:16:06 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=40166
Bug ID: 40166
Summary: Pointer to a hidden function alias, when obtained
across a DSO boundary at -O > 0, calls the visible
version of the symbol
Product: clang
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: pskocik at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Created attachment 21275
--> https://bugs.llvm.org/attachment.cgi?id=21275&action=edit
shell script to build & run a demonstration of the problem; run in an empty
directory
Also, the visible version then compares equal to the hidden one (both inside
and outside the DSO) even when the visible version is interposed.
Calling the hidden versions inside the DSO does ignore the interposition as it
should, but if the pointer to the hidden alias is passed outside the DSO and
then called, the interposed function is called.
The attached script demonstrates the problem (tested on x86_64 Linux).
The problem disappears if optimization's turned off (-O0). (gcc is doing the
right thing at all optimization levels.)
--
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/20181227/8f0a71dc/attachment-0001.html>
More information about the llvm-bugs
mailing list