Re: Segfault in HTCP CLR request on 64-bit

2009-10-02 Thread Adrian Chadd
The whole struct is on the local stack. Hence bzero() or memset() to 0. 2009/10/2 Matt W. Benjamin m...@linuxbox.com: Bzero?  Is it an already-allocated array/byte sequence?  (Apologies, I haven't seen the code.)  Assignment to NULL/0 is in fact correct for initializing a sole pointer, and

Re: Segfault in HTCP CLR request on 64-bit

2009-10-02 Thread Henrik Nordstrom
fre 2009-10-02 klockan 02:52 -0400 skrev Matt W. Benjamin: Bzero? Is it an already-allocated array/byte sequence? (Apologies, I haven't seen the code.) Assignment to NULL/0 is in fact correct for initializing a sole pointer, and using bzero for that certainly isn't typical. Also, for

Re: Segfault in HTCP CLR request on 64-bit

2009-10-02 Thread Jason Noble
Sorry, I went to bugzilla before reading all the e-mails here. As I commented on the bug report states, there is nothing fishy going on. While strlen(NULL) will always segfault, htcpBuildCountstr() wraps the strlen() call with a check for a NULL pointer: 260if (s) 261len =

Re: Segfault in HTCP CLR request on 64-bit

2009-10-02 Thread Henrik Nordstrom
fre 2009-10-02 klockan 11:48 -0400 skrev Jason Noble: Sorry, I went to bugzilla before reading all the e-mails here. As I commented on the bug report states, there is nothing fishy going on. While strlen(NULL) will always segfault, htcpBuildCountstr() wraps the strlen() call with a check

Re: Segfault in HTCP CLR request on 64-bit

2009-09-27 Thread Jason Noble
-cache.org To: Jason Noble ja...@linuxbox.com Cc: squid-dev@squid-cache.org Sent: Saturday, September 26, 2009 12:58:08 AM GMT -05:00 US/Canada Eastern Subject: Re: Segfault in HTCP CLR request on 64-bit Could you please create a bugzilla report for this, complete with a patch against Squid-2.HEAD

Segfault in HTCP CLR request on 64-bit

2009-09-25 Thread Jason Noble
I recently ran into an issue where Squid 2.7 would segfault trying to issue HTCP CLR requests. I found the segfault only occurred on 64-bit machines. While debugging, I found that the value of stuff.S.req_hdrs was not initialized but later, strlen was being called on it. This seems to -- by

Re: Segfault in HTCP CLR request on 64-bit

2009-09-25 Thread Adrian Chadd
Could you please create a bugzilla report for this, complete with a patch against Squid-2.HEAD and 2.7? I'll then commit it. 2009/9/26 Jason Noble ja...@linuxbox.com: I recently ran into an issue where Squid 2.7 would segfault trying to issue HTCP CLR requests.  I found the segfault only