1
1

Fix memory leak in configure, which prevents leak sanitizer usage

If building Open MPI with sanitizers, e.g
$ configure CC=clang CFLAGS=-fsanitize=address ....
configure test programs are also build with the sanitizers and will
report errors resulting in configure to fail.

Signed-off-by: Christoph Niethammer <niethammer@hlrs.de>
This commit is contained in:
Christoph Niethammer 2020-07-21 19:41:37 +02:00
parent 18418bfdf6
commit e0bd64f843

View File

@ -44,6 +44,7 @@ AC_DEFUN([OPAL_C_GET_ALIGNMENT],[
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
diff = ((char *)&p->x) - ((char *)&p->c);
free(p);
fprintf(f, "%d\n", (diff >= 0) ? diff : -diff);
]])], [AS_TR_SH([opal_cv_c_align_$1])=`cat conftestval`],
[AC_MSG_WARN([*** Problem running configure test!])