From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4775 invoked by alias); 11 Jun 2007 13:15:51 -0000 Received: (qmail 4763 invoked by uid 22791); 11 Jun 2007 13:15:50 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog10.obsmtp.com (HELO s200aog10.obsmtp.com) (207.126.144.124) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Jun 2007 13:15:46 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob010.postini.com ([207.126.147.11]) with SMTP; Mon, 11 Jun 2007 13:15:43 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7EC01DA70 for ; Mon, 11 Jun 2007 13:15:43 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 509504C226 for ; Mon, 11 Jun 2007 13:15:43 +0000 (GMT) Received: from [164.129.44.95] (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.7.5a-GA) with ESMTP id CKU34821 (AUTH "denis pilat"); Mon, 11 Jun 2007 15:15:41 +0200 (CEST) Message-ID: <466D4AFD.8070409@st.com> Date: Mon, 11 Jun 2007 13:15:00 -0000 From: Denis PILAT User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: Andrew STUBBS Cc: gdb-patches Subject: Re: [rfc] Overflow in transfer-rate References: <466D3A7D.9030101@st.com> <466D456F.5070406@st.com> In-Reply-To: <466D456F.5070406@st.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00146.txt.bz2 Andrew STUBBS wrote: > Denis PILAT wrote: >> In symfile.c/print_transfer_performance (), an overflow can occure >> when data_count (see below) is a large number. >> >> I propose either the following 1st patch, or to pass to "%llu"into >> the ui_out_field_fmt functino call, see the next patch proposal. > > I might also be worth taking a look at this proposal from some time > ago http://www.cygwin.com/ml/gdb-patches/2006-10/msg00184.html > Well, it sounds like an internal ST discussion but I prefer the patch in your link, it avoids overflow *and* prints transfer rate in a much clever way. Denis