Subject: Re: CVS commit: syssrc
To: Matthew Jacob <mjacob@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: source-changes
Date: 12/30/2000 12:15:06
On Sat, Dec 30, 2000 at 09:30:10PM +0200, Matthew Jacob wrote:
> Log Message:
> 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
> the assignment than I was saving in string space (it would have been
> cheap on a pdp11 or a 68k- but the address loads and assignments on something
> like sparc or alpha way outweigh the savings in space. Tsk.).
This really isn't a bug. Try compiling the module with -fwritable-strings
and it should work. If you want it to work, make it:
char foo[] = "XXXX";
...
foo[1] = 'Y';
--
-- Jason R. Thorpe <thorpej@zembu.com>