Skip to content

Commit e1e3962

Browse files
authored
[SYCL][LIT] Add deleter func for test in buffer.cpp to avoid potential SegFault (#2616)
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent c00c1fa commit e1e3962

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/test/basic_tests/buffer/buffer.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,8 @@ int main() {
579579

580580
{
581581
std::allocator<float8> buf_alloc;
582-
cl::sycl::shared_ptr_class<float8> data(new float8[8]);
582+
cl::sycl::shared_ptr_class<float8> data(new float8[8],
583+
[](float8 *p) { delete[] p; });
583584
cl::sycl::buffer<float8, 1, std::allocator<float8>>
584585
b(data, cl::sycl::range<1>(8), buf_alloc);
585586
}

0 commit comments

Comments
 (0)