compute-runtime icon indicating copy to clipboard operation
compute-runtime copied to clipboard

Refactor poolbuffer check to fix refcount issue when using clang comp…

Open Yanfeng-Mi opened this issue 2 months ago • 1 comments

…iler

The issue root-caused to the subtle difference of unique_ptr's destructor between clang and gcc:

Clang (libc++): Calls unique_ptr's destructor, which first clears the internal pointer to nullptr and then calls the deleter on the old pointer value. This means that within the destructor of the managed object, the owning unique_ptr's internal pointer is already nullified.

GCC (libstdc++): The destructor directly calls the deleter on the current pointer without first setting it to nullptr

Fix: using flag-based system to replace the problematic pointer comparison ref #744

Yanfeng-Mi avatar Oct 31 '25 03:10 Yanfeng-Mi

Hi @Yanfeng-Mi,

Thank you for your contribution.

We have found several minor issues with your commit, like line length, commit type etc. Could you please follow the https://github.com/intel/compute-runtime/blob/master/CONTRIBUTING.md guide and correct them?

kgibala avatar Dec 10 '25 11:12 kgibala

Hi @Yanfeng-Mi,

Thank you for your contribution.

We have found several minor issues with your commit, like line length, commit type etc. Could you please follow the https://github.com/intel/compute-runtime/blob/master/CONTRIBUTING.md guide and correct them? done~

Yanfeng-Mi avatar Dec 16 '25 02:12 Yanfeng-Mi

Hi @Yanfeng-Mi,

Thank you for the update.

Due to the holiday season, dispatch times may be longer than usual. We appreciate your understanding and patience. We will provide updates as soon as your order is dispatched according to our internal process.

kgibala avatar Dec 19 '25 07:12 kgibala