Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] MSAN use-of-uninitialized-value inside ngx_regex_module_init

Maxim Dounin
April 09, 2020 12:38PM
Hello!

On Thu, Apr 09, 2020 at 06:07:50AM +0000, Maciej wrote:

> Hi Nginx devlist!
>
> This patch fix use-of-uninitialized-value inside ngx_regex_module_init that come after Nginx is run with Clang MSAN
>
> SUMMARY: MemorySanitizer: use-of-uninitialized-value /workspace/nginx/src/core/ngx_regex.c:343:13 in ngx_regex_module_init
> ==45705==WARNING: MemorySanitizer: use-of-uninitialized-value
> #0 0x13cc4df in ngx_regex_module_init /workspace/nginx/src/core/ngx_regex.c:343:13
> #1 0x126187b in ngx_init_modules /workspace/nginx/src/core/ngx_module.c:72:17
> #2 0x122d30e in ngx_init_cycle /workspace/nginx/src/core/ngx_cycle.c:625:9
> #3 0x10f2189 in main /workspace/nginx/src/core/nginx.c:291:13
> #4 0x109d10a in _start /usr/src/lib/csu/amd64/crt1.c:76:7

Quoting MemorySanitizer docs
(https://clang.llvm.org/docs/MemorySanitizer.html#handling-external-code):

: MemorySanitizer requires that all program code is instrumented.
: This also includes any libraries that the program depends on, even
: libc. Failing to achieve this may result in false reports. For the
: same reason you may need to replace all inline assembly code that
: writes to memory with a pure C/C++ code.

Have you tried compiling PCRE with memory sanitizer as well?

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Re: [PATCH] MSAN use-of-uninitialized-value inside ngx_regex_module_init

Maxim Dounin 311 April 09, 2020 12:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready