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

Memory leaks detected #1013

Closed
fCorleone opened this issue Jul 6, 2018 · 2 comments
Closed

Memory leaks detected #1013

fCorleone opened this issue Jul 6, 2018 · 2 comments

Comments

@fCorleone
Copy link

When run program sampler_test, a memory leak has been found

=================================================================
==26145==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7fc8c32f8532 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99532)
    #1 0x7fc8c2e3ef59 in InitModule src/malloc_extension.cc:212
    #2 0x7fc8c2e3ef59 in MallocExtension::Register(MallocExtension*) src/malloc_extension.cc:226

SUMMARY: AddressSanitizer: 8 byte(s) leaked in 1 allocation(s).
@carnil
Copy link

carnil commented Jul 8, 2018

This issue was assigned CVE-2018-13420

@alk
Copy link
Contributor

alk commented Jul 8, 2018

There are multiple ways to define "leak". One way is "everything that isn't freed at the end". This is what leak sanitizer does. Another way to define leak is loosing non-constant number of allocated objects, which has real risk of eating all memory and OOMing the process.

While technically a "leak" on first definition, this is not real leak. The thing is, this memory is allocated exactly once. And is deliberately "leaked". See https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables on some rationale.

So closing as won't fix. This is not a bug, just false positive in the tool.

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

No branches or pull requests

3 participants