From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 7 09:18:26 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D82D16A41C for ; Thu, 7 Jul 2005 09:18:26 +0000 (GMT) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F233343D48 for ; Thu, 7 Jul 2005 09:18:25 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id DB9AD5CA82; Thu, 7 Jul 2005 02:18:25 -0700 (PDT) Date: Thu, 7 Jul 2005 11:18:25 +0200 From: Maxime Henrion To: freebsd-hackers@freebsd.org Message-ID: <20050707091825.GC14567@elvis.mu.org> References: <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net> <42CC2C9F.5000301@savvis.net> <20050706194100.GA5170@dice.seeling33.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050706194100.GA5170@dice.seeling33.de> User-Agent: Mutt/1.4.2.1i Subject: Re: bus error in strsep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2005 09:18:26 -0000 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