From owner-freebsd-current@FreeBSD.ORG Fri Nov 17 10:08:19 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89AFC16A407; Fri, 17 Nov 2006 10:08:19 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1-3.pacific.net.au [61.8.2.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24AD943D58; Fri, 17 Nov 2006 10:08:19 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 889FA5A0538; Fri, 17 Nov 2006 21:08:17 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 5B6998C13; Fri, 17 Nov 2006 21:08:16 +1100 (EST) Date: Fri, 17 Nov 2006 21:08:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jung-uk Kim In-Reply-To: <200611161506.58128.jkim@FreeBSD.org> Message-ID: <20061117210000.S11101@delplex.bde.org> References: <1163701391.00638085.1163691003@10.7.7.3> <455CB8CA.8040603@icyb.net.ua> <200611161506.58128.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 17 Nov 2006 12:48:02 +0000 Cc: freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org, Andriy Gapon Subject: Re: ZFS patches for FreeBSD. 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: Fri, 17 Nov 2006 10:08:19 -0000 On Thu, 16 Nov 2006, Jung-uk Kim wrote: > On Thursday 16 November 2006 02:15 pm, Andriy Gapon wrote: >> Hmm, I saw errors like this with some other 3rd party kernel module >> when its sources had constructs like: >> >> struct some_struct s = {0}; >> >> Changing the above initialization to explicit bzero() call helped >> in that case, but I think that there should be some compiler flags >> or something to handle this. > > AFAIK, there was no way to handle this GCC bug with compiler flags. > '-ffreestanding' should prevent this to happen but it does not. As > Max Laier pointed out, it was discussed long time ago. Bruce Evans > had good analysis on this issue, too. Source code that triggers this bug might be broken anyway. gcc should only call a function to do the zeroing for large structs, but large structs might be too large for the kernel stack. Bruce