This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Move once_flags in HostInfoLinux so the internal state struct
ClosedPublic

Authored by teemperor on Jun 10 2021, 11:41 PM.

Details

Summary

The HostInfoLinuxFields struct is supposed to be set up/torn down on Initialize/Terminate
and should contain all the state of the plugin. once_flags are part of this state and should
also be reset on Terminate so we can re-initialize these lazy values after the next
Initialize call.

This itself is NFC as the HostInfoLinux was broken before this patch and is still broken
afterwards. D104091 will be the proper fix.

Diff Detail

Event Timeline

teemperor created this revision.Jun 10 2021, 11:41 PM
teemperor requested review of this revision.Jun 10 2021, 11:41 PM
vitalybuka added inline comments.Jun 10 2021, 11:47 PM
lldb/source/Host/linux/HostInfoLinux.cpp
41

this still does not solve memory leak if HostInfoLinux::Initialize called twice

vitalybuka accepted this revision.Jun 10 2021, 11:50 PM

I see comment on the D104091

This revision is now accepted and ready to land.Jun 10 2021, 11:50 PM
This revision was landed with ongoing or failed builds.Jun 10 2021, 11:54 PM
This revision was automatically updated to reflect the committed changes.