Skip to content

Commit e1ea25d

Browse files
authored
Fixed subtle barrier_fpa bug in bli_thrcomm.c. (#690)
Details: - In bli_thrcommo.c, correctly initialize the BLIS_OPENMP element of the barrier function pointer array (barrier_fpa) to NULL when BLIS_ENABLE_OPENMP is *not* defined. Similarly, initialize the BLIS_POSIX element of barrier_fpa to NULL when BLIS_ENABLE_PTHREADS is not enabled. This bug was introduced in a1a5a9b and was likely the result of an incomplete edit. The effects of the bug would have likely manifested when querying a thrcomm_t that was initialized with a timpl_t value corresponding to a threading implementation that was omitted from the -t option at configure-time.
1 parent dc6e5f3 commit e1ea25d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frame/thread/bli_thrcomm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,17 @@ static thrcomm_barrier_ft barrier_fpa[ BLIS_NUM_THREAD_IMPLS ] =
115115
#if defined(BLIS_ENABLE_OPENMP)
116116
bli_thrcomm_barrier_openmp,
117117
#elif defined(BLIS_ENABLE_PTHREADS)
118-
bli_thrcomm_barrier_pthreads,
118+
NULL,
119119
#else
120-
bli_thrcomm_barrier_single,
120+
NULL,
121121
#endif
122122
[BLIS_POSIX] =
123123
#if defined(BLIS_ENABLE_PTHREADS)
124124
bli_thrcomm_barrier_pthreads,
125125
#elif defined(BLIS_ENABLE_OPENMP)
126-
bli_thrcomm_barrier_openmp,
126+
NULL,
127127
#else
128-
bli_thrcomm_barrier_single,
128+
NULL,
129129
#endif
130130
};
131131

0 commit comments

Comments
 (0)