-
-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Description
Hi all,
On Windows 10 64bit, LDC2 1.27.0-beta1. I am having issues with throwing exceptions in constructors. Address sanatiser is able to catch the issue as an access violation. Here is example code to trigger this issue:
import std.stdio;
class example: Exception {
this(string msg, string file = __FILE__, size_t line = __LINE__) {
super(msg, file, line);
}
}
class test {
this() {
throw new example("this is a test");
}
}
void main() {
try {
auto t = new test();
} catch (example e) {
writeln(e.msg);
}
}
Compiled with:
ldc2.exe -g -fsanitize='address' .\test.d -of='test.exe'
Access Violation is on "writeln(e.msg)" line.
Kind regards,
Mike Brown
0dminnimda
Metadata
Metadata
Assignees
Labels
No labels