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.
Comment #1 by bugzilla — 2007-04-24T05:23:14Z
String literals are read-only. It is undefined behavior to attempt to write to them.