From 08e0082e070354919de9584a8d26436a1dadeac0 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 15 Nov 2018 11:59:03 +0300 Subject: [PATCH] Fixed discovering of modules on 64-bit big-endian systems. The nxt_conf_map_object() function used nxt_int_t for NXT_CONF_MAP_INT, which was 8 bytes long on 64-bit systems. But the nxt_port_main_start_worker_handler() used it to map into the int field of the nxt_common_app_conf_t structure, which was 4 bytes. As the result, on a 64-bit big-endian system all the meaningful module type numbers were assigned into the gap above the "type" field. The bug was discovered on IBM/S390x. --- src/nxt_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nxt_conf.c b/src/nxt_conf.c index 1aeafc06..2255e12f 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -525,7 +525,7 @@ nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value, nxt_conf_map_t *map, uint8_t ui8; int32_t i32; int64_t i64; - nxt_int_t i; + int i; ssize_t size; off_t off; nxt_msec_t msec;