[OpenSIPS-Devel] [OpenSIPS/opensips] 635ce3: Memory allocators: Revert Q_MALLOC to 8-byte align...
Liviu Chircu
noreply at github.com
Fri Jul 2 09:37:25 EST 2021
Branch: refs/heads/3.1
Home: https://github.com/OpenSIPS/opensips
Commit: 635ce30f7226d0069726f797c23523fc44cd6f05
https://github.com/OpenSIPS/opensips/commit/635ce30f7226d0069726f797c23523fc44cd6f05
Author: Liviu Chircu <liviu at opensips.org>
Date: 2021-07-02 (Fri, 02 Jul 2021)
Changed paths:
M mem/f_malloc.c
M mem/hp_malloc.c
M mem/hp_malloc.h
M mem/q_malloc.c
M mem/q_malloc.h
Log Message:
-----------
Memory allocators: Revert Q_MALLOC to 8-byte alignment
Commit 1f55d05c2b actually upped Q_MALLOC's address alignment from
8-bytes to 16-bytes. While this isn't necessarily a bug (in fact,
it makes OpenSIPS more crash-safe), it enables new scenarios where
buffer overrun crashes would happen with F_MALLOC but not with Q_MALLOC.
And since Q_MALLOC is the intended crash debugger, these scenarios
must not be allowed, so we stick to 8-byte alignment. If anyone needs
16-byte aligned memory, they can just re-define ROUNDTO and re-compile.
(cherry picked from commit c29652fa10dbd34ce499f817891abe25964ee63b)
More information about the Devel
mailing list