Skip to content

Fix heap use after free ASAN/Valgrind#1535

Closed
IslamAbdelRahman wants to merge 2 commits intofacebook:masterfrom
IslamAbdelRahman:fix_lua_asan
Closed

Fix heap use after free ASAN/Valgrind#1535
IslamAbdelRahman wants to merge 2 commits intofacebook:masterfrom
IslamAbdelRahman:fix_lua_asan

Conversation

@IslamAbdelRahman
Copy link
Copy Markdown
Contributor

Dont use c_str() of temp std::string in RocksLuaCompactionFilter::Name()

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@IslamAbdelRahman has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.


const char* RocksLuaCompactionFilter::Name() const {
std::string name = "";
name_ = "";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving it to unblock the build. But I think we shouldn't recalculate the name if we already have it in name_.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Thanks for spotting and fixing the issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let me update it before landing

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@IslamAbdelRahman updated the pull request - view changes - changes since last import

@IslamAbdelRahman
Copy link
Copy Markdown
Contributor Author

Update to use cached name_

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

Successfully merging this pull request may close these issues.

4 participants