Bug 24593 – Some structs in core.sys.posix.sys.types should be union instead of struct

Status
NEW
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-06-09T14:23:18Z
Last change time
2024-12-07T13:43:36Z
Assigned to
No Owner
Creator
Tim
Moved to GitHub: dmd#17215 →

Comments

Comment #0 by tim.dlang — 2024-06-09T14:23:18Z
The types pthread_rwlock_t, pthread_rwlockattr_t, pthread_barrier_t, pthread_barrierattr_t are unions in the glibc headers, but structs in druntime. As a result they are bigger in druntime. Found by comparing type sizes in druntime with type sizes found with ImportC: https://github.com/dlang/dmd/pull/16571
Comment #1 by robert.schadek — 2024-12-07T13:43:36Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17215 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB