Hi Rémi,
On Thu, Jul 23, 2015 at 05:01:47PM +0200, Remi Gacogne wrote:
> I stumbled upon a minor valgrind warning when testing a SSL change:
>
> ==16783== Conditional jump or move depends on uninitialised value(s)
> ==16783== at 0x44E662: http_res_get_intercept_rule (proto_http.c:3730)
> ==16783== by 0x44E662: http_process_res_common (proto_http.c:6528)
> ==16783== by 0x4797B7: process_stream (stream.c:1851)
> ==16783== by 0x414634: process_runnable_tasks (task.c:238)
> ==16783== by 0x40B02F: run_poll_loop (haproxy.c:1528)
> ==16783== by 0x407F25: main (haproxy.c:1887)
>
> It looks like it's currently possible for the current_rule field to be
> evaluated before being set, probably since commit
> 152b81e7b2565862956af883820d4f79177d0651.
In fact normally it's not possible for it to be evaluated without a ruleset
pointer being set first, but the compiler has no way to detect this, let
alone valgrind. The fix is cheap and will probably save some time during
debugging sessions, so I've applied it.
Thanks!
Willy
On Thu, Jul 23, 2015 at 05:01:47PM +0200, Remi Gacogne wrote:
> I stumbled upon a minor valgrind warning when testing a SSL change:
>
> ==16783== Conditional jump or move depends on uninitialised value(s)
> ==16783== at 0x44E662: http_res_get_intercept_rule (proto_http.c:3730)
> ==16783== by 0x44E662: http_process_res_common (proto_http.c:6528)
> ==16783== by 0x4797B7: process_stream (stream.c:1851)
> ==16783== by 0x414634: process_runnable_tasks (task.c:238)
> ==16783== by 0x40B02F: run_poll_loop (haproxy.c:1528)
> ==16783== by 0x407F25: main (haproxy.c:1887)
>
> It looks like it's currently possible for the current_rule field to be
> evaluated before being set, probably since commit
> 152b81e7b2565862956af883820d4f79177d0651.
In fact normally it's not possible for it to be evaluated without a ruleset
pointer being set first, but the compiler has no way to detect this, let
alone valgrind. The fix is cheap and will probably save some time during
debugging sessions, so I've applied it.
Thanks!
Willy