Bug 9030 – immutable `_d_args` can be written to with `main(char[][])`

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-15T03:56:00Z
Last change time
2012-11-15T07:28:10Z
Keywords
wrong-code
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2012-11-15T03:56:04Z
--- extern (C) string[] rt_args(); void main(char[][] args) { assert(rt_args()[0][0]); args[0][0] = 0; assert(rt_args()[0][0]); // fails } --- Fixed in https://github.com/D-Programming-Language/druntime/pull/349
Comment #1 by github-bugzilla — 2012-11-15T07:27:57Z