Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][LIT] Add deleter func for test in buffer.cpp to avoid potentia… #2616

Merged
merged 1 commit into from
Oct 12, 2020

Conversation

v-klochkov
Copy link
Contributor

…l SegFault

Signed-off-by: Vyacheslav N Klochkov [email protected]

@v-klochkov v-klochkov requested a review from a team as a code owner October 8, 2020 18:00
@v-klochkov
Copy link
Contributor Author

This fix is a light version of the changes proposed here: #2591
It does not add buffer constructors.

Motivation for the change: SegFault on 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;
}

@bader bader merged commit e1e3962 into intel:sycl Oct 12, 2020
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Oct 14, 2020
* sycl: (566 commits)
  [SYCL] Fix explicit copy operation for host device (intel#2627)
  [SYCL] Fix initialization issue on Windows (intel#2632)
  [SYCL][CUDA] Disable image_write test on CUDA devices (intel#2630)
  [SYCL] Removes any knowledge of specific memory advices from PI API. (intel#2607)
  [BuildBot] Uplift GPU RT version for Linux to 20.40.18075 (intel#2626)
  [SYCL] Wrap complex global objects to control lifetime (intel#2516)
  [SYCL][CUDA] Image Basic Test (intel#1970)
  [SYCL] Align get_info<info::device::version>() with the SYCL spec (intel#2507)
  [Driver][SYCL] Correct optimization disabling option for gen (intel#2622)
  [SYCL][LIT] Add deleter func for test in buffer.cpp to avoid potential SegFault (intel#2616)
  [SYCL] Remove half type alias causing name conflicts (intel#2624)
  [BuildBot] OpenCL CPU/FPGAEMU driver uplift (intel#2620)
  [SYCL][Doc] Add overview of kernel-program caching (intel#2514)
  [SYCL] Remove two-input sub-group shuffles (intel#2614)
  [SYCL] Add support for new spelling of FPGA kernel attribute scheduler_target_fmax_mhz (intel#2618)
  [SYCL] Align image class constructors with the SYCL spec (intel#2603)
  [SYCL] Remove tests migrated to llvm-test-suite (intel#2611)
  [SYCL][NFC] Fix dependency for SYCL add_sycl_executable macro (intel#2613)
  [SYCL][PI][L0] Update environment variables from LEVEL0 to LEVEL_ZERO (intel#2612)
  [SYCL] Add KernelNameTypeVisitor validation check (intel#2596)
  ...
@v-klochkov v-klochkov deleted the public_vklochkov_mem_leaks3_c11 branch February 24, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants