haproxy public development tree
Go to file
Aurelien DARRAGON 5ad2b64262 BUG/MINOR: http_ana/txn: don't re-initialize txn and req var lists
In http_create_txn(): vars_init_head() was performed on both s->vars_txn
and s->var_reqres lists.

But this is wrong, these two lists are already initialized upon stream
creation in stream_new().
Moreover, between stream_new() and http_create_txn(), some variable may
be defined (e.g.: by the frontend), resulting in lists not being empty.

Because of this "extra" list initialization, already defined variables
can be lost.
This causes txn dependant code not being able to access previously defined
variables as well as memory leak because http_destroy_txn() relies on these
lists to perform the purge.

This proved to be the case when a frontend sets variables and lua sample
fetch is used in backend section as described in GH #1935.
Many thanks to Darragh O'Toole for his detailed report.

Removing extra var_init_head (x2) in http_create_txn() to fix the issue.
Adding somme comments in the code in an attempt to prevent future misuses
of s->var_reqres, and s->var_txn lists.

It should be backported in every stable version.
(This is an old bug that seems to exist since 1.6-dev6)

[cf: On 2.0 and 1.8, for the legacy HTTP code, vars_init() are used during
     the TXN cleanup, when the stream is reused. So, these calls must be
     moved from http_init_txn() to http_reset_txn() and not removed.]
2022-11-18 10:20:44 +01:00
.github CI: emit the compiler's version in the build reports 2022-11-14 11:14:02 +01:00
addons BUILD: prometheus: use __fallthrough in promex_dump_metrics() and IO handler() 2022-11-14 11:14:02 +01:00
admin CLEANUP: assorted typo fixes in the code and comments 2022-10-30 17:17:56 +01:00
dev DEV: poll: indicate the FD's side in front of its value 2022-11-17 10:56:35 +01:00
doc DOC: internal: commit notes about polling states and flags on connect() 2022-11-17 16:49:00 +01:00
examples
include MINOR: mux-h1: Rely on a H1S flag to know a WS key was found or not 2022-11-17 14:33:15 +01:00
reg-tests REG-TESTS: cache: Remove T-E header for 304-Not-Modified responses 2022-11-16 17:19:43 +01:00
scripts CLEANUP: assorted typo fixes in the code and comments 2022-10-30 17:17:56 +01:00
src BUG/MINOR: http_ana/txn: don't re-initialize txn and req var lists 2022-11-18 10:20:44 +01:00
tests
.cirrus.yml
.gitattributes
.gitignore CLEANUP: exclude udp-perturb with .gitignore 2022-09-16 15:47:04 +02:00
.mailmap
.travis.yml
BRANCHES
CHANGELOG [RELEASE] Released version 2.7-dev8 2022-10-14 20:45:23 +02:00
CONTRIBUTING
INSTALL
LICENSE
MAINTAINERS
Makefile BUILD: makefile: move the compiler option detection stuff to compiler.mk 2022-11-17 10:56:35 +01:00
README
SUBVERS
VERDATE [RELEASE] Released version 2.7-dev8 2022-10-14 20:45:23 +02:00
VERSION [RELEASE] Released version 2.7-dev8 2022-10-14 20:45:23 +02:00

The HAProxy documentation has been split into a number of different files for
ease of use.

Please refer to the following files depending on what you're looking for :

  - INSTALL for instructions on how to build and install HAProxy
  - BRANCHES to understand the project's life cycle and what version to use
  - LICENSE for the project's license
  - CONTRIBUTING for the process to follow to submit contributions

The more detailed documentation is located into the doc/ directory :

  - doc/intro.txt for a quick introduction on HAProxy
  - doc/configuration.txt for the configuration's reference manual
  - doc/lua.txt for the Lua's reference manual
  - doc/SPOE.txt for how to use the SPOE engine
  - doc/network-namespaces.txt for how to use network namespaces under Linux
  - doc/management.txt for the management guide
  - doc/regression-testing.txt for how to use the regression testing suite
  - doc/peers.txt for the peers protocol reference
  - doc/coding-style.txt for how to adopt HAProxy's coding style
  - doc/internals for developer-specific documentation (not all up to date)