From owner-cvs-src@FreeBSD.ORG Thu Mar 30 19:55:16 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B3FD16A428; Thu, 30 Mar 2006 19:55:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22B0943D62; Thu, 30 Mar 2006 19:55:10 +0000 (GMT) (envelope-from bz@FreeBSD.org) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id B99F92000F6; Thu, 30 Mar 2006 21:55:08 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id D6DF32000D4; Thu, 30 Mar 2006 21:55:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id B7C46444F41; Thu, 30 Mar 2006 19:53:35 +0000 (UTC) Date: Thu, 30 Mar 2006 19:53:35 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org In-Reply-To: <200603302145.57382.max@love2party.net> Message-ID: <20060330195236.G2181@maildrop.int.zabbadoz.net> References: <200603301857.k2UIv46o066136@repoman.freebsd.org> <20060330191338.Q2181@maildrop.int.zabbadoz.net> <200603302145.57382.max@love2party.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Cc: cvs-src@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/netipsec xform.h xform_ipip.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 19:55:16 -0000 On Thu, 30 Mar 2006, Max Laier wrote: > On Thursday 30 March 2006 21:17, Bjoern A. Zeeb wrote: >> On Thu, 30 Mar 2006, Bjoern A. Zeeb wrote: >>> bz 2006-03-30 18:57:04 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/netipsec xform.h xform_ipip.c >>> Log: >>> Fix more stack corruptions on amd64. >>> >>> Vararg functions have a different calling convention than regular >>> functions on amd64. Casting a varag function to a regular one to >>> match the function pointer declaration will hide the varargs from >>> the caller and we will end up with an incorrectly setup stack. >> >> I will try to go over sys/net*/** or even sys/** somewhen the next >> days and see if I can find more of them. >> >> If anybody knows an easy way to find all casted function pointers >> that are using varargs let me know ;-) > > Shouldn't we be able to teach Coverity? It certainly has the information > somewhere. next question: why does the compiler not complain? -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT