Changeset: 26531d444231 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=26531d444231 Modified Files: gdk/gdk_atomic.h Branch: default Log Message:
disable use of atomic instructions on 64-bit SunOS/Solaris While seemingly working fine on the Feb2013 branch, and also with 32-bit on the default branch, using atomic instructions for locks does not seems to work well in 64-bit SunOS/Solaris as of changeset b3ecb6c399c8. Among others, test sql/benchmarks/wisconsin/Tests/load.sql does segfault since then, but only with optimization enabled and assertions disabled. The problem appears to be that q_dequeue() tries to dequeue from an empty queue (q->last == 0), possibly because locks or semaphors do not work correctly(?). returning a NULL pointer, which is (was prior to changesets 54526d6ff524, ac7f87e1934a, f747286589c6) not handled properly. With assertions enabled or optimization disabled, the test works fine, suggesting that the problems are related to optimization, but only when there are no extra statistics collected as with assertions enabled. Not using atomic instructions on 64-bit SunOS/Solaris appears to be the safe fall-back (for now?). diffs (12 lines): diff --git a/gdk/gdk_atomic.h b/gdk/gdk_atomic.h --- a/gdk/gdk_atomic.h +++ b/gdk/gdk_atomic.h @@ -92,7 +92,7 @@ #define ATOMIC_INIT(lck, fcn) ((void) 0) -#elif defined(__GNUC__) || defined(__INTEL_COMPILER) +#elif (defined(__GNUC__) || defined(__INTEL_COMPILER)) && !(defined(__sun__) && SIZEOF_SIZE_T == SIZEOF_LNG) #define ATOMIC_GET_sht(var, lck, fcn) var #define ATOMIC_SET_sht(var, val, lck, fcn) (var = (val)) _______________________________________________ checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
