https://bugs.llvm.org/show_bug.cgi?id=41453
Bug ID: 41453
Summary: calling omp_unset_lock() on lock never set, or already
unset drops core
Product: OpenMP
Version: unspecified
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
It gives core dump within the runtime
__kmp_release_queuing_lock(0x0, 0xffffffff00000000, 0x0, 0x0, 0x1, 0x0), at
0x7fb7121e3278
using the libomp.so that was built with spack install llvm-develop,
and compiled with gcc.
It gives an assertion failure with the libomp.so that is currently under
development for OMPT support.
I suspect the core dump is independent of the compiler.
Program to reproduce and Makefile below.
-----------------------------------------------------------
// lockbug -- reproduce assertion failure in libomp.so, when user
// calls omp_unset_lock on a lock that was never set.
// It also will fail on a duplicate free
#include <omp.h>
int main(int argc, char **argv)
{
omp_lock_t lock1;
omp_set_num_threads(4);
// initialize the lock
omp_init_lock(&lock1);
#pragma omp parallel
{
#pragma omp master
{
omp_unset_lock(&lock1); // lock was never set
}
}
}
-----------------------------
GCC=~/bin/linux-rhel7-x86_64/gcc-4.8.5/gcc-7.3.0-2bfpv2u6zl5wux44mswawrkpzh2fillo/bin/gcc
OMP_PATH=~/bin/linux-rhel7-x86_64/gcc-4.8.5//gcc-7.3.0/llvm-develop-rm4ypf2twg2yxshj5ptucddikviq63to/
INCPATH=-I$(OMP_PATH)/lib/clang/7.0.1/include/
LIBPATH=-Wl,-rpath=$(OMP_PATH)/lib -L$(OMP_PATH)/lib
LIBS=$(LIBPATH) -lomp
SOURCES=lockbug.c
TARGETS=lockbug
default all:$(TARGETS)
lockbug: $(SOURCES)
$(GCC) -g -o $@ $(SOURCES) -fopenmp $(INCPATH) $(LIBS)
clean:
/bin/rm -f $(TARGETS) core*
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs