Bug 22181 – No stack trace if usage of SimpleDllMain in static linked DLL

Status
NEW
Severity
normal
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2021-08-05T15:08:50Z
Last change time
2024-12-07T13:41:18Z
Keywords
dll
Assigned to
No Owner
Creator
RK
Moved to GitHub: dmd#17427 →

Comments

Comment #0 by frame86 — 2021-08-05T15:08:50Z
It seems that SimpleDllMain plays not well with static linked DLLs. The trace is empty. Tested under Windows 10 but same problem on Windows 7. Doesn't matter if 32 or 64 bit. This example would not need SimpleDllMain but other complex functions may require it. // dmd -g -version=lib -L/IMPLIB -of=common.dll version (lib) { import core.sys.windows.dll; mixin SimpleDllMain; export int test() { return 123; } } else { import std.stdio; pragma(lib, "common.lib"); extern int test(); void main() { assert(test() == 123); try { throw new Exception("test"); } catch (Throwable e) { const(char)[] lines; foreach (n; e.info) lines ~= n; assert(lines.length > 0); } } }
Comment #1 by robert.schadek — 2024-12-07T13:41:18Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17427 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB