April 24, 2007 [Issue 1184] New: assignment failure | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1184 Summary: assignment failure Product: D Version: 1.010 Platform: Other OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: sheffmail@mail.ru The following code compiles successfully but when it runs it generates SIGSEGV: int main(char[][] args) { char[] a = "a"; a[0] = 'b'; } That bug only takes place in linux, in windows that code runs without fault. -- |
April 24, 2007 [Issue 1184] assignment failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1184 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from bugzilla@digitalmars.com 2007-04-24 05:23 ------- String literals are read-only. It is undefined behavior to attempt to write to them. -- |
Copyright © 1999-2021 by the D Language Foundation