Selaa lähdekoodia

Make sure a handle is initialized before trying to read it

Samuel Thibault 7 vuotta sitten
vanhempi
commit
aeea106048
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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;