oshmem java: really abort in bad situations
The previous condition just called assert(), which is a no-op in non-debug builds. Change it to print a message and then call abort() to really actually above. This was CID 1270155.
Этот коммит содержится в:
родитель
dfd21e465d
Коммит
b27ba475ef
@ -633,12 +633,15 @@ JNIEXPORT jboolean JNICALL Java_shmem_Addr_testLock(
|
|||||||
{
|
{
|
||||||
int r = shmem_test_lock((long*)addr);
|
int r = shmem_test_lock((long*)addr);
|
||||||
|
|
||||||
if(r == 0)
|
if (0 == r) {
|
||||||
return JNI_FALSE;
|
return JNI_FALSE;
|
||||||
else if(r == 1)
|
} else if (1 == r) {
|
||||||
return JNI_TRUE;
|
return JNI_TRUE;
|
||||||
else
|
}
|
||||||
assert(0);
|
|
||||||
|
/* Should never get here */
|
||||||
|
opal_output(0, "*** Java lock is neither true nor false; something is very wrong!");
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_shmem_Addr_waitShort(
|
JNIEXPORT void JNICALL Java_shmem_Addr_waitShort(
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user