Every `CUDA_ERROR_FUNC` could allow a memory leak

Aperta
#274 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
backend

Direzione di ricerca

The issue names the error-checking macros CUDA_ERROR_FUNC and CUSOLVER_ERROR_FUNC, which throw cuda_error without freeing allocated pointers. Start by finding where these macros are defined and used across the backend wrappers. The issue suggests a replacement macro that takes a list of pointers to deallocate, but the exact design is undecided and needs maintainer input. Done means every such call frees its allocations on failure, and this is checked by a test that forces an error path.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

If CUDA_ERROR_FUNC, CUSOLVER_ERROR_FUNC etc is called and the result != CUDA_SUCCESS, a cuda_error will be thrown and any allocated pointers will not be deallocated, causing a memory leak.

We should replace each *_ERROR_FUNC with ERROR_FUNC_WITH_POINTERS_TO_DEALLOCATE or something like that. This would also provide a list of pointers to deallocate in the event that the operation does not return CUDA_SUCCESS, preventing memory leaks.

Ping @Alexander-Kleymenov

Lingua principale
C++
Stelle
777
Fork
183
Merge medio
2g 16h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di uxlfoundation/oneMath

Tutte le issue di uxlfoundation/oneMath

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.