[llvm-bugs] [Bug 36885] New: Clang++ generates unaligned stub symbol holding a pointer
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 23 15:06:34 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=36885
Bug ID: 36885
Summary: Clang++ generates unaligned stub symbol holding a
pointer
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: rahulchaudhry at chromium.org
CC: llvm-bugs at lists.llvm.org
Reduced testcase:
---------------- test.cpp ----------------
char str[]= "..";
int foo(void) {
return 0;
}
class bar {
};
int main(void) {
try {
return foo();
} catch(bar &e) {
return 1;
}
}
------------------------------------------
$ clang++ -fPIE -S test.cpp
# relevant sections from test.s:
.type str, at object # @str
.data
.globl str
str:
.asciz ".."
.size str, 3
.type _ZTS3bar, at object # @_ZTS3bar
.section .rodata._ZTS3bar,"aG", at progbits,_ZTS3bar,comdat
.weak _ZTS3bar
_ZTS3bar:
.asciz "3bar"
.size _ZTS3bar, 5
.type _ZTI3bar, at object # @_ZTI3bar
.section .data.rel.ro._ZTI3bar,"aGw", at progbits,_ZTI3bar,comdat
.weak _ZTI3bar
.p2align 3
_ZTI3bar:
.quad _ZTVN10__cxxabiv117__class_type_infoE+16
.quad _ZTS3bar
.size _ZTI3bar, 16
.data
.L_ZTI3bar.DW.stub:
.quad _ZTI3bar
This last symbol, '.L_ZTI3bar.DW.stub' ends up directly following 'str' in
.data section (at offset 3).
Note that there is no '.p2align' directive for this symbol.
This is a stub symbol used in <main> for indirect reference to the typeinfo for
class bar.
--
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/20180323/73135d3d/attachment.html>
More information about the llvm-bugs
mailing list