Bug 16049 – core.sys.windows structs have wrong sizes and aligns

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2016-05-20T05:31:00Z
Last change time
2016-10-01T11:45:11Z
Keywords
pull
Assigned to
nobody
Creator
jiki

Attachments

IDFilenameSummaryContent-TypeSize
1599verify16049.zipverification tool for struct sizesapplication/octet-stream45638

Comments

Comment #0 by jiki — 2016-05-20T05:31:32Z
core.sys.windows.* modules came with 2.070. I'm verifying sizes of the structs by comparing with ones in Windows SDK headers. So, I found that many have wrong sizes and/or field alignments. These problems would make runtime error. Most of them are in Win64 environment. I'll send a PR later.
Comment #1 by jiki — 2016-05-20T08:36:44Z
Comment #2 by jiki — 2016-05-21T00:05:34Z
(In reply to jiki from comment #1) > done > https://github.com/dlang/druntime/pull/1576 Note that I deferred to commit a module MMSYSTEM because it gets many conflicts with/without my previous commit #1574 for issue 15959.
Comment #3 by jiki — 2016-05-22T16:43:51Z
(In reply to jiki from comment #2) > Note that I deferred to commit a module MMSYSTEM > because it gets many conflicts with/without my previous commit #1574 for > issue 15959. Fixed.
Comment #4 by jiki — 2016-06-07T06:10:47Z
Created attachment 1599 verification tool for struct sizes Attached my verification tool. (nearly plain list of structs) This is intended to work with my custom druntime repo. Please see readme in zip.
Comment #5 by github-bugzilla — 2016-06-07T13:01:40Z
Commit pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/81a6a644038b805357bc966e67c701c1e40fde33 Merge pull request #1576 from qchikara/pr-win32-align Fix issue 16049 - core.sys.windows structs have wrong sizes and aligns
Comment #6 by github-bugzilla — 2016-10-01T11:45:11Z
Commit pushed to stable at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/81a6a644038b805357bc966e67c701c1e40fde33 Merge pull request #1576 from qchikara/pr-win32-align