[llvm-bugs] [Bug 41730] New: [Address space] Missing check for validity of addr space conversions for 'this' parameter
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 3 07:41:22 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41730
Bug ID: 41730
Summary: [Address space] Missing check for validity of addr
space conversions for 'this' parameter
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: anastasia.stulova at arm.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Currently Clang will accept invalid address space conversion generated
implicitly when passing objects to 'this' parameter.
For example:
struct MyType {
MyType(int i) : i(i) {}
int i;
};
MyType __attribute__((address_space(10))) m = 123;
This code should only be allowed if target permits conversions from AS 123 to 0
implicitly. However, we don't support yet target hooks to setup address space
conversions (explained in RFC:
http://lists.llvm.org/pipermail/cfe-dev/2019-March/061541.html) and therefore
adding such check will prevent using addr spaces in C++.
The solution to that could be addr space method qualifiers that is review:
https://reviews.llvm.org/D57464
See original discussion in https://reviews.llvm.org/D59988.
--
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/20190503/1cee11fa/attachment.html>
More information about the llvm-bugs
mailing list