[llvm-bugs] [Bug 41453] New: calling omp_unset_lock() on lock never set, or already unset drops core
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 10 09:31:13 PDT 2019
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: unassignedbugs at nondot.org
Reporter: itzkowitzmarty at gmail.com
CC: llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190410/bbaa9ca8/attachment.html>
More information about the llvm-bugs
mailing list