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

recalloc is wrong in windows/override_functions.cc #682

Open
GoogleCodeExporter opened this issue Jul 23, 2015 · 1 comment
Open

recalloc is wrong in windows/override_functions.cc #682

GoogleCodeExporter opened this issue Jul 23, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

According to http://en.cppreference.com/w/c/memory/realloc (and many other 
manuals), realloc is not supposed to zero all allocated memory, only the newly 
allocated memory.

You can see the zeroing of memory here:
https://code.google.com/p/gperftools/source/browse/src/windows/override_function
s.cc#57
which only exists in the override implementation on Windows

What version of the product are you using? On what operating system?
GPerfTools 2.4

Original issue reported on code.google.com by mark.ben...@10gen.com on 21 Apr 2015 at 9:17

@GoogleCodeExporter
Copy link
Author

This is actually recalloc not realloc. But it is wrong indeed.

Thanks for reporting it. If you can submit a patch for that issue that would be 
great too :)

Original comment by alkondratenko on 25 Apr 2015 at 11:09

  • Changed title: recalloc is wrong in windows/override_functions.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant