-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillainvalidResolved as invalid, i.e. not a bugResolved as invalid, i.e. not a buglibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Description
| Bugzilla Link | 42396 |
| Resolution | INVALID |
| Resolved on | Jun 25, 2019 15:41 |
| Version | unspecified |
| OS | All |
| Attachments | Reproducer |
| CC | @dwblaikie,@mclow,@zygoloid |
Extended Description
Inspired by: https://stackoverflow.com/questions/56760874/discrepancy-in-c-between-over-aligned-struct-and-enum-within-container
Given an enumeration type with a specified alignment, the elements in a vector of such a type should be aligned correctly. This appears not to be the case - and can lead to UBSAN going off.
In the reproducer, I also check the size of a 16-element array of these two types.
Clang says they're different sizes - that suggests to me that there's a clang problem here.
The alignment in the containers bit could be related to #23008 . (might even be the same bug)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillainvalidResolved as invalid, i.e. not a bugResolved as invalid, i.e. not a buglibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.