From owner-freebsd-current@FreeBSD.ORG Mon Dec 17 06:49:27 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89BAE16A419 for ; Mon, 17 Dec 2007 06:49:27 +0000 (UTC) (envelope-from sean@chittenden.org) Received: from davie.textdrive.com (davie.textdrive.com [207.7.108.101]) by mx1.freebsd.org (Postfix) with ESMTP id 7706E13C4FD for ; Mon, 17 Dec 2007 06:49:27 +0000 (UTC) (envelope-from sean@chittenden.org) Received: from [10.0.0.54] (209-204-160-248.dsl.dynamic.sonic.net [209.204.160.248]) by davie.textdrive.com (Postfix) with ESMTP id F3D4DC9E38; Mon, 17 Dec 2007 06:23:12 +0000 (GMT) Message-Id: <6CC6D8A1-D480-4A27-9ED1-01108777D04E@chittenden.org> From: Sean Chittenden To: Alexander Kabaev In-Reply-To: <20071216143454.7239c97b@kan.dnsalias.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Sun, 16 Dec 2007 22:23:12 -0800 References: <20071216211832.X83419@mp2.macomnet.net> <20071216143454.7239c97b@kan.dnsalias.net> X-Mailer: Apple Mail (2.915) Cc: current@freebsd.org Subject: Re: route(8) core dump, possible gcc(1) related X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 06:49:27 -0000 >> 1033 q = strchr(s,'/'); >> 1034 if (q && which == RTA_DST) { >> 1035 *q = '\0'; >> 1036 if ((val = inet_network(s)) != INADDR_NONE) { >> 1037 inet_makenetandmask( >> 1038 val, &su->sin, strtoul(q+1, >> 0, 0)); 1039 return (0); >> 1040 } >> 1041 *q = '/'; >> 1042 } >> >> Any comments? >> > Preliminary results show that inet_network from libc is somehow > thrashing $ebx even if it is not supposed to. -O0 disables value > caching in register and always allocates stack slot for the 'q' > pointer, so the problem is not visible. Does setting q to volatile suffice as a workaround for the problem? I was talking to someone last week that said they have taken to using volatile as a work around for GCC aligning instructions inside of conditionals improperly. -sc -- Sean Chittenden sean@chittenden.org http://sean.chittenden.org/