Skip to content

Fix linetables leak #1176

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

Merged

Conversation

fredriss
Copy link

@fredriss fredriss commented May 5, 2020

No description provided.

fredriss and others added 4 commits May 5, 2020 08:31
This reverts commit f4db8e0.

This was cherry-picked incorrectly
…on sort

Summary:
Motivation: When setting breakpoints in certain projects line sequences are frequently being inserted out of order.

Rather than inserting sequences one at a time into a sorted line table, store all the line sequences as we're building them up and sort and flatten afterwards.

Reviewers: jdoerfert, labath

Reviewed By: labath

Subscribers: teemperor, labath, mgrang, JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D72909

(cherry picked from commit 39f1335)
This addresses some post-commit feedback on D72909.

(cherry picked from commit 3f9b6b2)
We were creating a bunch of LineSequence objects but never deleting
them.

This fixes the leak and changes the code to use std::unique_ptr, to make
it harder to make the same mistake again.

(cherry picked from commit 18a96fd)
@fredriss
Copy link
Author

fredriss commented May 5, 2020

@swift-ci test macos

@fredriss fredriss merged commit 40fe7cd into swiftlang:apple/stable/20200108 May 5, 2020
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.

2 participants