4paradigm / 4paradigm/OpenMLDB

ut: alloc-dealloc-mismatch (operator new [] vs free) in api_server_test

Open Beginner friendly
#2,153 1 comment 0 reactions 0 assignees View on GitHub
bug wontfix
Dominant language
C++
Stars
1.7k
Forks
331
Avg merge
12d 12h
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.