소스 검색

Make sure a handle is initialized before trying to read it

Samuel Thibault 8 년 전
부모
커밋
aeea106048
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/core/dependencies/data_concurrency.c

+ 2 - 0
src/core/dependencies/data_concurrency.c

@@ -122,6 +122,8 @@ static unsigned _starpu_attempt_to_submit_data_request(unsigned request_from_cod
 	mode &= ~STARPU_COMMUTE;
 	mode &= ~STARPU_SSEND;
 	mode &= ~STARPU_LOCALITY;
+	if (mode & STARPU_R)
+		STARPU_ASSERT_MSG(handle->initialized, "handle %p is not initialized while trying to read it", handle);
 	if (mode == STARPU_RW)
 		mode = STARPU_W;