4paradigm / 4paradigm/OpenMLDB
ut: alloc-dealloc-mismatch (operator new [] vs free) in api_server_test
- Lenguaje dominante
- C++
- Estrellas
- 1.7k
- Forks
- 331
- Merge medio
- 12 d 12 h
- PR fusionados (30 d)
- 1
Descripción
Ref #358
```
==7595==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs free) on 0x60600024df40
```
https://github.com/4paradigm/OpenMLDB/blob/326295840f6c2932c2d47937f8cf0ddf6c238664/hybridse/include/base/fe_slice.h#L104
is new [], we should use delete [], not free.
Guía de contribución
Línea de trabajo
The issue points to a specific line in hybridse/include/base/fe_slice.h where memory allocated with new[] is incorrectly freed with free. Start by examining that file around line 104 to understand the context. Look for the corresponding deallocation call and replace free with delete[]. Run the api_server_test with address sanitizer to verify the fix resolves the alloc-dealloc-mismatch error.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 70/100