bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [bug-wget] Segfault when trying to use metalinks


From: Darshit Shah
Subject: Re: [Bug-wget] [bug-wget] Segfault when trying to use metalinks
Date: Wed, 11 Sep 2013 10:43:35 +0530

I have debugged this a little further.

 I bet an assert(i < opt.jobs); at multi.c:148 would fail.
>>  I'm not sure how this code is supposed to work, but work from there.
>>
>> Even, I'm not very aware of the code, but it does seem like the problem
>  lies there. All the traces point to it.
>
> assert (i < opt.jobs) would be wrong, since this region of the code is
simply calculating the range values based on the chunk_size. A new thread
for each range is not being spawned.

The issue was that struct range is defined with int variables, and for file
sizes > 4GB, there was an integer overflow. Replacing int with wgint fixes
the segfault.

However, valgrind continues to throw all those invalid write errors, which
leads me to believe that the issue is much deeper than this, but I have no
idea on where to start debugging this.

-- 
Thanking You,
Darshit Shah



On Tue, Sep 10, 2013 at 8:06 AM, Darshit Shah <address@hidden> wrote:

> I bet an assert(i < opt.jobs); at multi.c:148 would fail.
>>  I'm not sure how this code is supposed to work, but work from there.
>>
>> Even, I'm not very aware of the code, but it does seem like the problem
>  lies there. All the traces point to it.
>
>  It's funny how valgrind itself segfaulted, valgrind developers would
>> probably be interested in that.
>>
>
> The crash is expected. It's mentioned in their FAQ's that is Valgrind
> reports invalid reads or writes, there is a large chance that valgrind
> itself will crash in m_memcheck. So, unless Valgrind continues to crash
> after the errors are fixed, this is expected behaviour.
>
>>
>> Don't worry about the sendmsg() warning from libc (it's shoud have been
>> suppressed imho).
>>
>
> I am not really sure as to what causes this to come up and why it must be
> suppressed. I'll dig deeper when I have the time.
>
> --
> Thanking You,
> Darshit Shah
>
>


-- 
Thanking You,
Darshit Shah


reply via email to

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