Hi all,
AddressSanitizer is throwing an access-violation error - I've managed to boil it down to this example:
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'
The error is flagged on the writeln(e.msg). Do I need to do something special to pass a string to an exception? dup?
Kind regards,
Mike Brown