[nginx] Fixed NGX_TID_T_FMT format specification for uint64_t.
Maxim Dounin
mdounin at mdounin.ru
Mon Jul 23 15:36:47 UTC 2018
details: http://hg.nginx.org/nginx/rev/d230c797b168
branches:
changeset: 7323:d230c797b168
user: Maxim Dounin <mdounin at mdounin.ru>
date: Sun Jul 22 04:03:40 2018 +0300
description:
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.
diffstat:
src/os/unix/ngx_thread.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff --git a/src/os/unix/ngx_thread.h b/src/os/unix/ngx_thread.h
--- a/src/os/unix/ngx_thread.h
+++ b/src/os/unix/ngx_thread.h
@@ -47,12 +47,12 @@ typedef uint32_t ngx_tid_t;
#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
More information about the nginx-devel
mailing list