]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] task: fix possible crash when some timeouts are not configured
authorWilly Tarreau <w@1wt.eu>
Sun, 9 Aug 2009 07:09:54 +0000 (09:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 9 Aug 2009 07:27:56 +0000 (09:27 +0200)
commit734c3d317735e1bbd4e83d41ae1fefc80b34d445
tree939984fcc24d00c8dcf43a0055f5b5b6ea514609
parent06700118d0ff3efc1ae1cb395fc3440422cc9e74
[BUG] task: fix possible crash when some timeouts are not configured

Cristian Ditoiu reported a major regression when testing 1.3.19 at
transfer.ro. It would crash within a few minutes while 1.3.15.10
was OK. He offered to help so we could run gdb and debug the crash
live. We finally found that the crash was the result of a regression
introduced by recent fix 814c978fb67782ceeaf1db74abfe7083938bedff
(task: fix possible timer drift after update) which makes it possible
for a tree walk to start from a detached task if this task has got
its timeout disabled due to a missing timeout.

The trivial fix below has been extensively tested and confirmed not
to crash anymore.

Special thanks to Cristian who spontaneously provided a lot of help
and trust to debug this issue which at first glance looked impossible
after reading the code and traces, but took less than an hour to spot
and fix when caught live in gdb ! That's really appreciated !
(cherry picked from commit 34e98ea70d09195e8e047b3ea22c23506598687d)
src/task.c