From owner-freebsd-current@FreeBSD.ORG Mon Oct 6 18:30:19 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2B46106568F for ; Mon, 6 Oct 2008 18:30:19 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 4D0FA8FC19 for ; Mon, 6 Oct 2008 18:30:19 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id m96IUFla034705; Mon, 6 Oct 2008 22:30:15 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1223317815; bh=84DCOfuW4KxBhozFKEZiy1mkIfwrcxJLr4pYWbC nK70=; l=766; h=Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=cFZfvfxwaeia8xlnNvEiKD6j9 NVy7zsmO10y1GZXdb5d7SidYXKmjfaJHZmxVPcXMS+BY/9MYfieSl6LeMGFgt4W7rdz 4/1NNpT0WHMWmw94ubq01rg+tcBleC03QG27wCBnANEDpAscLQ4Dj6IHBsk/Yl289d7 HmcSLzr1oubQ= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id m96IUFBW034704; Mon, 6 Oct 2008 22:30:15 +0400 (MSD) (envelope-from ache) Date: Mon, 6 Oct 2008 22:30:14 +0400 From: Andrey Chernov To: Tim Kientzle Message-ID: <20081006183014.GB33333@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Tim Kientzle , jos@catnook.com, freebsd-current@freebsd.org References: <20081004080511.GA72641@lizzy.catnook.local> <20081004161024.GA67323@nagual.pp.ru> <20081004222249.GA48928@lizzy.catnook.local> <48E80F02.4070309@freebsd.org> <20081005233256.GB8507@lizzy.catnook.local> <48E95D0E.50202@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48E95D0E.50202@freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-current@freebsd.org Subject: Re: firefox3-bin crashes near arc4random_buf() 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, 06 Oct 2008 18:30:19 -0000 On Sun, Oct 05, 2008 at 05:34:22PM -0700, Tim Kientzle wrote: > Something is still screwy about the backtrace. dbopen() > doesn't call arc4random_buf. However, it does call > mkstemp() which does call arc4random_uniform, which should > be right next to arc4random_buf in memory. GCC optimizations > could be obscuring the call stack here. FYI arc4random_uniform() just do some internal calculations then call arc4random() (perhaps several times) which have threaded lock, like any other arc4random* family. Like you can see, calculation not involves division, so division by zero can't happen and upper_bound passed by mkstemp() is very reasonable small number. Calling arc4random_buf() is not possible in this path. -- http://ache.pp.ru/