[Openmp-commits] [openmp] r250729 - Fix OMP_PLACES negation operator parsing (!place)
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Mon Oct 19 12:43:02 PDT 2015
Author: jlpeyton
Date: Mon Oct 19 14:43:01 2015
New Revision: 250729
URL: http://llvm.org/viewvc/llvm-project?rev=250729&view=rev
Log:
Fix OMP_PLACES negation operator parsing (!place)
Just moved the *scan++ line up before the recursive call. Otherwise,
infinite recursion occurs and leads to a segmentation fault.
Modified:
openmp/trunk/runtime/src/kmp_affinity.cpp
Modified: openmp/trunk/runtime/src/kmp_affinity.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_affinity.cpp?rev=250729&r1=250728&r2=250729&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_affinity.cpp (original)
+++ openmp/trunk/runtime/src/kmp_affinity.cpp Mon Oct 19 14:43:01 2015
@@ -2831,9 +2831,9 @@ __kmp_process_place(const char **scan, k
(*scan)++; // skip '}'
}
else if (**scan == '!') {
+ (*scan)++; // skip '!'
__kmp_process_place(scan, osId2Mask, maxOsId, tempMask, setSize);
KMP_CPU_COMPLEMENT(tempMask);
- (*scan)++; // skip '!'
}
else if ((**scan >= '0') && (**scan <= '9')) {
next = *scan;
More information about the Openmp-commits
mailing list