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>
Этот коммит содержится в:
родитель
60aa97b301
Коммит
6564c1b942
@ -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!])
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user