This corrects some interesting choices that were present in the HIP
unit tests such as e.g. de-allocating memory allocated with new[] using free. All of these were identified via cppcheck.
이 커밋은 다음에 포함됨:
1 부모
09d866a639
커밋
a619ac6f92
7 파일이 변경됨
+278
-52
검색과 일치하는 파일 없음
@@ -46,7 +46,6 @@ int main(int argc, char *argv[])
|
||||
A_h = new char[Nbytes];
|
||||
|
||||
HIPCHECK ( hipMalloc((void **) &A_d, Nbytes) );
|
||||
A_h = (char*)malloc(Nbytes);
|
||||
|
||||
printf ("Size=%zu memsetval=%2x \n", Nbytes, memsetval);
|
||||
HIPCHECK ( hipMemsetD8(A_d, memsetval, Nbytes) );
|
||||
@@ -61,7 +60,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
hipFree((void *) A_d);
|
||||
free(A_h);
|
||||
delete [] A_h;
|
||||
passed();
|
||||
|
||||
}
|
||||
새 이슈에서 참조
사용자 차단