Date: Sun, 16 Dec 2007 22:23:12 -0800 From: Sean Chittenden <sean@chittenden.org> To: Alexander Kabaev <kabaev@gmail.com> Cc: current@freebsd.org Subject: Re: route(8) core dump, possible gcc(1) related Message-ID: <6CC6D8A1-D480-4A27-9ED1-01108777D04E@chittenden.org> In-Reply-To: <20071216143454.7239c97b@kan.dnsalias.net> References: <20071216211832.X83419@mp2.macomnet.net> <20071216143454.7239c97b@kan.dnsalias.net>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6CC6D8A1-D480-4A27-9ED1-01108777D04E>