bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Segmentation fault with current development version of wg


From: Tim Rühsen
Subject: Re: [Bug-wget] Segmentation fault with current development version of wget
Date: Tue, 30 Apr 2013 21:14:17 +0200
User-agent: KMail/1.13.7 (Linux/3.7-trunk-amd64; KDE/4.8.4; x86_64; ; )

Hi Darshit,

I understand that your patch was just a quick hack.

But even than you should avoid doing
        opt.method == "POST"
for string comparisons.

This definitely not portable.
Not every compiler/linker aggregates two occurrences of the same static string 
into one address in memory.

You should use strcmp or strcasecmp to check if opt.method points to "POST".

Regards, Tim

Am Dienstag, 30. April 2013 schrieb Darshit Shah:
> Okay, I could not prevent myself from looking into it.
> 
> It seems as if the SUSPEND_POST_DATA macro was being called during a
> recursive download attempt.
> 
> Attaching a hack around the situation. Will look more deeply when I have
> more time to identify what caused the regression.
> 
> On Tue, Apr 30, 2013 at 9:09 PM, Darshit Shah <address@hidden> wrote:
> 
> > I'm in the middle of University exams at the moment. I'll still have a
> > look at it tomorrow when I get a breather.
> >
> > However, it looks like wget is converting any method to a POST request
> > which is weird since that should have caused it to fail most of the tests.
> >
> > I'll have to look into it and check what is causing this issue.
> >
> > On Tue, Apr 30, 2013 at 8:46 PM, Tim Ruehsen <address@hidden> wrote:
> >
> >> Hi,
> >>
> >> you can even reproduce it with a simple
> >>         wget -r http://translationproject.org/latest/make
> >>
> >> Darshit, maybe you can have a look at it. It has something to do with
> >> opt.method (set to read-only "POST" in http.c, line 1772).
> >>
> >> Even with --method=GET opt.method points to "POST". And the code tries to
> >> uppercase it inline.
> >>
> >> Regards, Tim
> >>
> >> Am Tuesday 30 April 2013 schrieb Stefano Lattarini:
> >> > Here is the reproducer:
> >> >
> >> >   $ wget --passive-ftp -nv --recursive --level=1 --no-directories
> >> > --no-parent \ --no-check-certificate -A '*.po'
> >> > http://translationproject.org/latest/make 2013-04-30 16:41:25
> >> > URL:https://translationproject.org/latest/make/ [5489/5489] -> "make"
> >> [1]
> >> > Segmentation fault
> >> >
> >> > Sorry, I don't have to look into this more deeply ATM, not to provide
> >> > further feedback.  Hope you can reproduce this yourself; otherwise, 
I'll
> >> > try to get back to you in the next days.
> >> >
> >> > Regards, and HTH,
> >> >   Stefano
> >>
> >> Mit freundlichem Gruß
> >>
> >>      Tim Rühsen
> >>
> >
> >
> >
> > --
> > Thanking You,
> > Darshit Shah
> > Research Lead, Code Innovation
> > Kill Code Phobia.
> > B.E.(Hons.) Mechanical Engineering, '14. BITS-Pilani
> >
> 
> 
> 
> -- 
> Thanking You,
> Darshit Shah
> Research Lead, Code Innovation
> Kill Code Phobia.
> B.E.(Hons.) Mechanical Engineering, '14. BITS-Pilani
> 




reply via email to

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