Re: [PATCH 0/9] Fix issues detected by clang analyzer.

2019-06-23 Thread Willy Tarreau
Hi Tim, On Sun, Jun 23, 2019 at 10:10:08PM +0200, Tim Duesterhus wrote: > Willy, > > these patches are the result of running > > scan-build make -j4 all TARGET=linux-glibc DEBUG=-DDEBUG_STRICT=1 > > While it spits out a bunch of false negatives that are quite convoluted these > patches

Potential partnership - guest posts or sponsored content

2019-06-23 Thread Dennis P .
Hello, I want to apologize in advance if I'm contacting the wrong person, My name is Dennis and I'm a Blog Outreach specialist, I saw your blog on https://www.haproxy.com and decided to get in touch. I think that a lot of my clients will be interested in regular article placements,

[PATCH 3/9] BUG/MINOR: cfgparse: Stop passing NULL to memcpy

2019-06-23 Thread Tim Duesterhus
If an environment variable does not exist then `getenv` returns NULL. This is accounted for in the calculation of `val_len`, setting `val_len` to `0` if the variable does not exist. However clang analzyer complains about passing NULL to `memcpy`, even if the number of bytes to copy is `0`: >

[PATCH 8/9] MINOR: proxy: Restructure code to assert that `proxy_parse_declare` does not leak

2019-06-23 Thread Tim Duesterhus
clang analyzer was unable to detect that at either the `request` or the `response` case must match (this is ensured in line 455/456). --- src/proxy.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/proxy.c b/src/proxy.c index 731f5e2a6..97ae0fd55 100644 ---

[PATCH 1/9] BUG/MINOR: cfgparse: Pass correct type to `calloc`

2019-06-23 Thread Tim Duesterhus
clang analzyer complains: > Result of 'calloc' is converted to a pointer of type 'unsigned int', which > is incompatible with sizeof operand type 'int' This bug was introduced in f131481a0af79037bc6616edf450ae81d80084d7. This fix must be backported to all branches containing that commit (2.0,

[PATCH 0/9] Fix issues detected by clang analyzer.

2019-06-23 Thread Tim Duesterhus
Willy, these patches are the result of running scan-build make -j4 all TARGET=linux-glibc DEBUG=-DDEBUG_STRICT=1 While it spits out a bunch of false negatives that are quite convoluted these patches either: 1. Make it easier for clang analyzer to understand the code by making a few

[PATCH 4/9] BUG/MINOR: mworker: Fix segmentation fault during cfgparse

2019-06-23 Thread Tim Duesterhus
Consider this configuration: frontend fe_http mode http bind *:8080 default_backend be_http backend be_http mode http server example example.com:80 program foo bar Running with valgrind results in: ==16252== Invalid read of size 8

[PATCH 6/9] BUG/MINOR: debug: Silence warning about ignored return value

2019-06-23 Thread Tim Duesterhus
We can't use `shut_your_big_mouth_gcc` here. Use the `!` trick suggested by Vincent Bernat in the list in Message-ID: m3ftoek0k6@luffy.cx --- include/common/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/debug.h b/include/common/debug.h index

[PATCH 5/9] BUG/MINOR: spoe: Fix memory leak if failing to allocate memory

2019-06-23 Thread Tim Duesterhus
Technically harmless, but it annoys clang analyzer. This bug was introduced in 336d3ef0e77192582c98b3c578927a529ceadd9b. This fix should be backported to HAProxy 1.9+. --- src/flt_spoe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/flt_spoe.c b/src/flt_spoe.c index

[PATCH 2/9] BUG/MINOR: log: Detect missing sampling ranges in config

2019-06-23 Thread Tim Duesterhus
Consider a config like: global log 127.0.0.1:10001 sample :10 local0 No sampling ranges are given here, leading to NULL being passed as the first argument to qsort. This configuration does not make sense anyway, a log without ranges would never log. Thus output an error if no ranges

[PATCH 9/9] MINOR: h2: Assert that a status line exists in h2_make_htx_(request|response)

2019-06-23 Thread Tim Duesterhus
clang analyzer had issues detecting that the status line is constructed whenever the `H2_PHDR_FND_NONE` flag is set. Help it by BUG_ON(!sl). Another possibility might be just replacing the check for `H2_PHDR_FND_NONE` by a check for the existance of the status line: `!sl`. I'll leave the

[PATCH 7/9] MINOR: debug: Make ABORT_NOW() emit abort() for clang analyzer

2019-06-23 Thread Tim Duesterhus
Apparently the analyzer does not detect that assigning the `1` address will never return. --- include/common/debug.h | 4 1 file changed, 4 insertions(+) diff --git a/include/common/debug.h b/include/common/debug.h index d6bc3c208..c38acdf53 100644 --- a/include/common/debug.h +++

Re: Zero RTT in backend server side

2019-06-23 Thread Igor Pav
Hi Olivier, The `retry-on 0rtt-rejected` will only work in tcp mode, is that possible to let it work in http mode too? On Mon, May 6, 2019 at 4:37 AM Olivier Houchard wrote: > > Hi Igor, > > On Mon, May 06, 2019 at 12:26:33AM +0800, Igor Pav wrote: > > Hi, Olivier, thanks for the effort. So can

Re: http-request do-resolve for rDNS queries

2019-06-23 Thread Baptiste
Hi Luke, It is not yet doable with do-resolve. That said you can easily write an slow agent to do this. I can help if you need to. Baptiste Le ven. 21 juin 2019 à 15:25, Luke Seelenbinder a écrit : > Hello all, > > Is it possible to use the new `http-request do-resolve` to do reverse DNS >