Bug 8042 – extern(C) on structs can cause stack corruption with opEquals

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2012-05-04T15:11:58Z
Last change time
2024-12-13T17:59:50Z
Assigned to
No Owner
Creator
Robert DaSilva
Moved to GitHub: dmd#18437 →

Attachments

IDFilenameSummaryContent-TypeSize
1100test.dtest caseapplication/octet-stream202

Comments

Comment #0 by spunit262 — 2012-05-04T15:11:58Z
Created attachment 1100 test case It looks like what's happening is the extern(C) on the struct is affecting the hidden helper function __xopEquals use by the typeinfo. Once I figured out what was wrong, it was easy enough to make sure the strut was extern(C), but actually figure out what was going wrong wasn't easy.
Comment #1 by robert.schadek — 2024-12-13T17:59:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18437 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB