Commit d5058e2
authored
[SYCL] Fix element type in handler::copy (#2590)
The original motivation for the fix was a SegFault reported in such trivial case on Linux:
#include <memory>
#include <iostream>
struct A {
A() { std::cout << "Init\n"; }
~A() { std::cout << "Free\n"; }
};
int main() {
{ std::cout << "good1:\n"; std::shared_ptr<A[]> good1(new A[5]); }
{ std::cout << "good2:\n"; std::shared_ptr<A> good2(new A[5], [](A *p) {delete[] p;}); }
{ std::cout << "baad1:\n"; std::shared_ptr<A> baad1(new A[5]); }
return 0;
}
Fixing the LIT test that had similar bad pattern code revealed a weakness in handler.hpp, which was also fixed.
Signed-off-by: Vyacheslav N Klochkov <[email protected]>1 parent 8149957 commit d5058e2
File tree
2 files changed
+5
-5
lines changed- sycl
- include/CL/sycl
- test/basic_tests/handler
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1589 | 1589 | | |
1590 | 1590 | | |
1591 | 1591 | | |
1592 | | - | |
| 1592 | + | |
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
| |||
1612 | 1612 | | |
1613 | 1613 | | |
1614 | 1614 | | |
1615 | | - | |
| 1615 | + | |
1616 | 1616 | | |
1617 | 1617 | | |
1618 | 1618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
0 commit comments