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

fix(engine/savefile): fix crash when reading proclist from scap #1726

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion userspace/libsinsp/sinsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,11 @@ void sinsp::on_new_entry_from_proc(void* context,

if(!sinsp_tinfo)
{
ASSERT(tinfo != NULL);
if (tinfo == NULL)
{
// we have an fd but no associated tinfo, skip it
return;
}
Comment on lines +927 to +931
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks fine, I'm just wondering if we're not doing something to the tune of ignoring all fds from scap files now :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems we are not doing any worse than before (at least comparing the output with a previous libs version)


auto newti = build_threadinfo();
newti->init(tinfo);
Expand Down