changeset 7323:d230c797b168

Fixed NGX_TID_T_FMT format specification for uint64_t. Previously, "%uA" was used, which corresponds to ngx_atomic_uint_t. Size of ngx_atomic_uint_t can be easily different from uint64_t, leading to undefined results.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 22 Jul 2018 04:03:40 +0300
parents 6649d4433266
children b234199c7ed8
files src/os/unix/ngx_thread.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/unix/ngx_thread.h	Wed Jul 18 18:51:25 2018 +0300
+++ b/src/os/unix/ngx_thread.h	Sun Jul 22 04:03:40 2018 +0300
@@ -47,12 +47,12 @@
 #elif (NGX_DARWIN)
 
 typedef uint64_t   ngx_tid_t;
-#define NGX_TID_T_FMT         "%uA"
+#define NGX_TID_T_FMT         "%uL"
 
 #else
 
 typedef uint64_t   ngx_tid_t;
-#define NGX_TID_T_FMT         "%uA"
+#define NGX_TID_T_FMT         "%uL"
 
 #endif