[Issue 22523] New: DRuntime options passed after -- affect current process
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 18 16:46:25 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22523
Issue ID: 22523
Summary: DRuntime options passed after -- affect current
process
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: moonlightsentinel at disroot.org
[1] changed Druntime's argument parsing to forward `--DRT-` options after `--`
to `main`. But those options still affect the current process!
Example:
==============================================================
// test.d
import core.stdc.stdio;
int main()
{
puts("Executed main although it should be skipped!");
return 1;
}
unittest {} // Prevents main to be executed by default
==============================================================
> dmd -unittest test.d
> ./test -- --DRT-testmode=run-main
Executed main although it should be skipped!
[1] https://github.com/dlang/druntime/pull/2881
--
More information about the Digitalmars-d-bugs
mailing list