Просмотр исходного кода

fix assertion: a request may have slipped through while unlocking the handle when allocating on the destination

Samuel Thibault лет назад: 10
Родитель
Сommit
5dd0687128
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/datawizard/memalloc.c

+ 3 - 3
src/datawizard/memalloc.c

@@ -493,10 +493,10 @@ static size_t try_to_free_mem_chunk(struct _starpu_mem_chunk *mc, unsigned node)
 					/* mc is still associated with the old
 					 * handle, now free it.
 					 */
-					STARPU_ASSERT(handle->per_node[node].refcnt == 0);
 
-					/* now the actual buffer may be freed */
-					freed = do_free_mem_chunk(mc, node);
+					if (handle->per_node[node].refcnt == 0)
+						/* And still nobody on it, now the actual buffer may be freed */
+						freed = do_free_mem_chunk(mc, node);
 				}
 			}
 		}