[njs] Removing MSAN unpoison workarounds for clang-9 and below.

Dmitry Volyntsev xeioex at nginx.com
Wed Jan 12 18:00:07 UTC 2022


details:   https://hg.nginx.org/njs/rev/c786ef848004
branches:  
changeset: 1800:c786ef848004
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed Jan 12 17:58:18 2022 +0000
description:
Removing MSAN unpoison workarounds for clang-9 and below.

MSAN unpoison workaround was introduced in 13dbdff9b76f (0.3.9) for a
false-positive bug in clang-9 and below.

Also, after 80d95b2881f6 (0.4.1) the bug is not triggered anymore.

diffstat:

 src/njs_value.h |  11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

diffs (42 lines):

diff -r abbf77fcd111 -r c786ef848004 src/njs_value.h
--- a/src/njs_value.h	Tue Jan 11 13:02:33 2022 +0000
+++ b/src/njs_value.h	Wed Jan 12 17:58:18 2022 +0000
@@ -1028,8 +1028,6 @@ njs_set_object_value(njs_value_t *value,
         (pq)->lhq.key.length = 0;                                             \
         (pq)->lhq.key.start = NULL;                                           \
         (pq)->lhq.value = NULL;                                               \
-        /* FIXME: False-positive in MSAN?. */                                 \
-        njs_msan_unpoison(&(pq)->key, sizeof(njs_value_t));                   \
         (pq)->own_whiteout = NULL;                                            \
         (pq)->query = _query;                                                 \
         (pq)->shared = 0;                                                     \
@@ -1085,9 +1083,6 @@ njs_value_property_i64(njs_vm_t *vm, njs
     njs_int_t    ret;
     njs_value_t  key;
 
-    /* FIXME: False-positive in MSAN?. */
-    njs_msan_unpoison(&key, sizeof(njs_value_t));
-
     ret = njs_int64_to_string(vm, &key, index);
     if (njs_slow_path(ret != NJS_OK)) {
         return ret;
@@ -1104,9 +1099,6 @@ njs_value_property_i64_set(njs_vm_t *vm,
     njs_int_t    ret;
     njs_value_t  key;
 
-    /* FIXME: False-positive in MSAN?. */
-    njs_msan_unpoison(&key, sizeof(njs_value_t));
-
     ret = njs_int64_to_string(vm, &key, index);
     if (njs_slow_path(ret != NJS_OK)) {
         return ret;
@@ -1123,9 +1115,6 @@ njs_value_property_i64_delete(njs_vm_t *
     njs_int_t    ret;
     njs_value_t  key;
 
-    /* FIXME: False-positive in MSAN?. */
-    njs_msan_unpoison(&key, sizeof(njs_value_t));
-
     ret = njs_int64_to_string(vm, &key, index);
     if (njs_slow_path(ret != NJS_OK)) {
         return ret;



More information about the nginx-devel mailing list