-
Notifications
You must be signed in to change notification settings - Fork 339
[lldb] Prevent Task formatter from showing bogus children #10495
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
[lldb] Prevent Task formatter from showing bogus children #10495
Conversation
@swift-ci test |
// Very rarely, the child tasks include a bogus task which has an | ||
// invalid task id of 0. | ||
llvm::remove_if(tasks, [&](auto task_ptr) { | ||
auto task_info = m_reflection_ctx->asyncTaskInfo(task_ptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just FYI, another pattern to drop an error is llvm::expectedToOptional()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a bug with this patch, left some suggestions.
We should try to assert in some of the tests that we no longer print tasks with ID's 0, even if this error is rare
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Very rarely, we've seen a task include a bogus child task. When this has occurred, the task id has been zero, which is invalid. This change filters out a Task's children if they have a task id of 0. (cherry picked from commit 529abca)
Very rarely, we've seen a task include a bogus child task. When this has occurred, the task id has been zero, which is invalid. This change filters out a Task's children if they have a task id of 0.