Commit 30578ba
authored
[SYCL][ClangLinkerWrapper] Fix read of invalid memory (#15472)
The problem was the buffer gets freed when we go out of the `if` because
the `unique_ptr` is created there, so just make a copy that will stay
alive as long as we need it. Confirmed fix with valgrind.
This is already tested by
`sycl/test-e2e/NewOffloadDriver/multisource.cpp` and it fails
sporadically which led me to this fix.
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>1 parent 68e03e8 commit 30578ba
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | | - | |
1475 | | - | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1476 | 1480 | | |
1477 | 1481 | | |
1478 | 1482 | | |
| |||
0 commit comments