Subject: Re: CVS commit: syssrc
To: Matthew Jacob <mjacob@netbsd.org>
From: Charles M. Hannum <root@ihack.net>
List: port-sparc64
Date: 12/30/2000 19:46:51
[Copying to port-sparc64, since I see you posted here too.]

> There's a compiler bug for sparc64 that makes the construct:
> 
>         char *foo = "XXXX";
>         ...
>         foo[1] = 'Y';
> 
> blow up (in the kernel) with the 2nd assignment. Work around it here-
> it's probably just as well- I was spending more in cpu instructions doing

This is *not* a bug.  That initializer creates a string literal, which
is a `const char *'.  It gets stored in the text section.  It `blows
up' because you're trying to write to a read-only page.  `Don't do
that.'