[nginx] Win32: i386 now assumed when crossbuilding (ticket #2416).
Sergey Kandaurov
pluknet at nginx.com
Fri Feb 24 10:32:42 UTC 2023
details: https://hg.nginx.org/nginx/rev/79c04253bc43
branches:
changeset: 8128:79c04253bc43
user: Maxim Dounin <mdounin at mdounin.ru>
date: Thu Feb 23 18:15:59 2023 +0300
description:
Win32: i386 now assumed when crossbuilding (ticket #2416).
Previously, NGX_MACHINE was not set when crossbuilding, resulting in
NGX_ALIGNMENT=16 being used in 32-bit builds (if not explicitly set to a
correct value). This in turn might result in memory corruption in
ngx_palloc() (as there are no usable aligned allocator on Windows, and
normal malloc() is used instead, which provides 8 byte alignment on
32-bit platforms).
To fix this, now i386 machine is set when crossbuilding, so nginx won't
assume strict alignment requirements.
diffstat:
auto/configure | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 17b3efb45b17 -r 79c04253bc43 auto/configure
--- a/auto/configure Thu Feb 23 18:15:57 2023 +0300
+++ b/auto/configure Thu Feb 23 18:15:59 2023 +0300
@@ -44,6 +44,7 @@ if test -z "$NGX_PLATFORM"; then
else
echo "building for $NGX_PLATFORM"
NGX_SYSTEM=$NGX_PLATFORM
+ NGX_MACHINE=i386
fi
. auto/cc/conf
More information about the nginx-devel
mailing list