Date: Thu, 7 Jul 2005 11:18:25 +0200 From: Maxime Henrion <mux@FreeBSD.org> To: freebsd-hackers@freebsd.org Subject: Re: bus error in strsep Message-ID: <20050707091825.GC14567@elvis.mu.org> In-Reply-To: <20050706194100.GA5170@dice.seeling33.de> References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> <42CC2C9F.5000301@savvis.net> <20050706194100.GA5170@dice.seeling33.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Stefan Sperling wrote: > On Wed, Jul 06, 2005 at 12:10:23PM -0700, Maksim Yevmenkin wrote: > > Maksim Yevmenkin wrote: > > >> char *c = "whats:your:name:buddy?"; > > > > > > ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write > > > into it. replace it with > > > > made type. that should read "that is read only copy" :) > > Dark corners of C... So it's my own fault, as usual :) > thanks a lot :) Or you can be a bad guy and compile with GCC and -fwritable-strings so that it puts the const string into a read-write section :-). This is an absolutely evil hack, of course. Maxime
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050707091825.GC14567>