[llvm-bugs] [Bug 42756] New: Crash after explicit call to a base constructor with virtual base
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 25 11:30:12 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42756
Bug ID: 42756
Summary: Crash after explicit call to a base constructor with
virtual base
Product: clang
Version: 8.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: securesneakers at gmail.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
Created attachment 22289
--> https://bugs.llvm.org/attachment.cgi?id=22289&action=edit
Minimal example that reproduces the issue
The code below crashes Windows:
struct interface { };
struct base1_if : virtual interface { };
struct base2_if : virtual interface { };
struct base_if : base1_if, base2_if { };
struct derived : base_if {
derived()
: base_if()
{ }
};
int main() { derived d; }
Command line:
$ clang-cl -v
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
$ clang-cl main.cpp
$ main.exe
Few notes:
- Removing explicit call to "base_if" avoids the issue.
- Generated assembly contains "memset(addr, 0, r8,0FFFFFFFFFFFFFFF8h)":
00007FF7482310A9 mov r8,0FFFFFFFFFFFFFFF8h
00007FF7482310B0 mov dword ptr [rsp+2Ch],eax
00007FF7482310B4 call memset (07FF748232FE0h)
--
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/20190725/8507a597/attachment-0001.html>
More information about the llvm-bugs
mailing list