]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: debug: properly mark the entire libs archive read-only
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Apr 2026 11:52:33 +0000 (13:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Apr 2026 11:52:33 +0000 (13:52 +0200)
commit4034f78fc49a45f78d5009a67ef91951d9632fc6
treef28b20f2f632b91e1bb15c8658bf3cd9bf748b7d
parent3c63298acdb298ed2cf18cde0b47c361ed7fdd8c
BUG/MINOR: debug: properly mark the entire libs archive read-only

In 3.4-dev7, commit e1738b665d ("MINOR: debug: read all libs in memory
when set-dumpable=libs") reads dependencies into memory to store them as
a tar archive for later debugging. There was an attempt to mark the whole
archive read-only, except that the size passed in argument to mprotect()
is wrong: lib_size is only assigned after the operation and is still zero
at the moment this is done. new_size ought to be used instead.

This needs to be backported wherever the commit above is backported, at
least 3.2.
src/tools.c