Welcome! Log In Create A New Profile

Advanced

[njs] Fixed building with GCC ASan.

Valentin Bartenev
November 10, 2016 07:34AM
details: http://hg.nginx.org/njs/rev/d8b1e2576409
branches:
changeset: 246:d8b1e2576409
user: Valentin Bartenev <vbart@nginx.com>
date: Thu Nov 10 15:33:02 2016 +0300
description:
Fixed building with GCC ASan.

diffstat:

nxt/auto/memalign | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 7a42d1e83ae2 -r d8b1e2576409 nxt/auto/memalign
--- a/nxt/auto/memalign Wed Nov 09 15:04:40 2016 +0300
+++ b/nxt/auto/memalign Thu Nov 10 15:33:02 2016 +0300
@@ -18,6 +18,8 @@ nxt_feature_test="#include <stdlib.h>

if (posix_memalign(&p, 4096, 4096) != 0)
return 1;
+
+ free(p);
return 0;
}"
. ${NXT_AUTO}feature
@@ -35,8 +37,13 @@ if [ $nxt_found = no ]; then
nxt_feature_test="#include <stdlib.h>

int main(void) {
- if (memalign(4096, 4096) == NULL)
+ void *p;
+
+ p = memalign(4096, 4096)
+ if (p == NULL)
return 1;
+
+ free(p);
return 0;
}"
. ${NXT_AUTO}feature

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

[njs] Fixed building with GCC ASan.

Valentin Bartenev 411 November 10, 2016 07:34AM



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

Online Users

Guests: 251
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