diff --git a/C/dbase.c b/C/dbase.c index defedf993..383853cec 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -2652,7 +2652,6 @@ new_lu_int_key(Int key) p->ArityOfPE = 3; p->OpcodeOfPred = Yap_opcode(_op_fail); p->cs.p_code.TrueCodeOfPred = p->CodeOfPred = FAILCODE; - WRITE_UNLOCK(ae->ARWLock); INT_LU_KEYS[hash_key] = p0; return p; } diff --git a/C/utilpreds.c b/C/utilpreds.c index f35052384..bca2c62b1 100644 --- a/C/utilpreds.c +++ b/C/utilpreds.c @@ -1990,6 +1990,10 @@ AddAtomToHash(CELL *st, Atom at) } else { char *c = RepAtom(at)->StrOfAE; int ulen = strlen(c); + /* fix hashing over empty atom */ + if (!ulen) { + return st; + } start = (CELL *)c; if (ulen % CellSize == 0) { len = ulen/CellSize; diff --git a/H/Yap.h b/H/Yap.h index 630326d71..7821833d1 100644 --- a/H/Yap.h +++ b/H/Yap.h @@ -145,8 +145,10 @@ #ifdef THREADS #if USE_PTHREAD_LOCKING +#ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 #endif +#endif #include #endif diff --git a/packages/clpqr b/packages/clpqr index 0072deb51..e3ee70d59 160000 --- a/packages/clpqr +++ b/packages/clpqr @@ -1 +1 @@ -Subproject commit 0072deb511e839a2f2df6bfa170076f9c8ecb6bb +Subproject commit e3ee70d5971a5af8c9a2a3a5fe8a1892c3777f2b diff --git a/packages/jpl b/packages/jpl index 8192d5f9b..d661852f7 160000 --- a/packages/jpl +++ b/packages/jpl @@ -1 +1 @@ -Subproject commit 8192d5f9ba0bba55fdd96b4473d68d8cf57f51aa +Subproject commit d661852f76fe24441d983ef6f4e60ba90cfe17c4