bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Disable assertions by default


From: Tim Ruehsen
Subject: Re: [Bug-wget] Disable assertions by default
Date: Fri, 21 Nov 2014 10:54:06 +0100
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

On Friday 21 November 2014 13:19:18 Darshit Shah wrote:
> On 11/20, Ángel González wrote:
> >On 20/11/14 15:29, Darshit Shah wrote:
> >>--- a/src/progress.c
> >>+++ b/src/progress.c
> >>@@ -992,6 +992,7 @@ create_image (struct bar_progress *bp, double
> >>dl_total_time, bool done)>>
> >>      {
> >>      
> >>        int percentage = 100.0 * size / bp->total_length;
> >>        assert (percentage<= 100);
> >>
> >>+      assert (false);
> >>
> >>        if (percentage<  100)
> >>        
> >>          sprintf (p, "%3d%%", percentage);
> >>
> >>-- 2.1.3
> >
> >Surely you didn't want to include this :)
> 
> Shit! No, that was meant to be for my own debugging purposes. I was trying
> to see if I could induce an assertion failure. Good thing the patch goes
> through review first.
> 
> I've fixed this in the attached patch.

Just a comment.
In case the assertions are disabled, there still should be a check and a 
WARNING message. It should inform the user that something weird happened and 
the mailing list should be informed. Wget should try to continue if possible. 
We just had the report that an assertion occurred after hours (and many GB) of 
downloading and Wget just stopped... It was just one file out of thousands 
that would have been skipped...

IMHO. we should have something like this ASAP. And having this, we also might 
get rid of assertions completely. That could make this patch obsolete.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]