Bug 15036 – SimpleDllMain assumes various symbols are available unqualified

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2015-09-11T10:17:00Z
Last change time
2015-10-04T18:19:22Z
Keywords
pull
Assigned to
nobody
Creator
jakobovrum

Comments

Comment #0 by jakobovrum — 2015-09-11T10:17:02Z
Code like the following does not compile: version(Windows) { import core.sys.windows.dll : SimpleDllMain; mixin SimpleDllMain; } Because SimpleDllMain depends on dll_process_attach, dll_process_detach, dll_thread_attach and dll_thread_detach from core.sys.windows.dll. Statically importing the module, or using a renamed import, would also break the mixin. It would probably be a robust fix to add: import core.sys.windows.dll : dll_process_attach, dll_process_detach, dll_thread_attach, dll_thread_detach; To the body of the DllMain function inside the mixin.
Comment #1 by dlang-bugzilla — 2015-09-12T18:43:52Z
Comment #2 by github-bugzilla — 2015-09-12T19:40:07Z
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/957d83f1c342e44229d148027a449c956a42c122 fix Issue 15036 - SimpleDllMain assumes various symbols are available unqualified https://github.com/D-Programming-Language/druntime/commit/15cde5050c8341fec3c8b5f5ad83eac2a92fe6f3 Merge pull request #1385 from CyberShadow/pull-20150912-184323 fix Issue 15036 - SimpleDllMain assumes various symbols are available…
Comment #3 by github-bugzilla — 2015-10-04T18:19:22Z
Commits pushed to stable at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/957d83f1c342e44229d148027a449c956a42c122 fix Issue 15036 - SimpleDllMain assumes various symbols are available unqualified https://github.com/D-Programming-Language/druntime/commit/15cde5050c8341fec3c8b5f5ad83eac2a92fe6f3 Merge pull request #1385 from CyberShadow/pull-20150912-184323