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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user