mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/3163-gperftools-build'
* origin/topic/timw/3163-gperftools-build: Define early_shutdown lambda earlier in zeek-setup, avoids build failure with gperftools
This commit is contained in:
commit
2da6f94ab6
3 changed files with 19 additions and 13 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
|||
6.1.0-dev.175 | 2023-07-06 09:27:03 +0200
|
||||
|
||||
* Define early_shutdown lambda earlier in zeek-setup, avoids build failure with gperftools (Tim Wojtulewicz)
|
||||
|
||||
6.1.0-dev.172 | 2023-07-05 13:32:42 -0700
|
||||
|
||||
* Set `SPICY_BUILD_DIRECTORY` in `zeek-path-dev`. (Robin Sommer, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
6.1.0-dev.172
|
||||
6.1.0-dev.175
|
||||
|
|
|
@ -774,6 +774,20 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
dbl_histogram_metric_type = make_intrusive<OpaqueType>("dbl_histogram_metric");
|
||||
dbl_histogram_metric_family_type = make_intrusive<OpaqueType>("dbl_histogram_metric_family");
|
||||
|
||||
// After spinning up Broker, we have background threads running now. If
|
||||
// we exit early, we need to shut down at least Broker to get a clean
|
||||
// program exit. Otherwise, we may run into undefined behavior, e.g., if
|
||||
// Broker is still accessing OpenSSL but OpenSSL has already cleaned up
|
||||
// its state due to calling exit(). This needs to be defined here before
|
||||
// potential USE_PERFTOOLS_DEBUG scope below or the definition gets lost
|
||||
// when that variable is defined.
|
||||
auto early_shutdown = []
|
||||
{
|
||||
broker_mgr->Terminate();
|
||||
delete iosource_mgr;
|
||||
delete telemetry_mgr;
|
||||
};
|
||||
|
||||
// The leak-checker tends to produce some false
|
||||
// positives (memory which had already been
|
||||
// allocated before we start the checking is
|
||||
|
@ -867,18 +881,6 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
if ( supervisor_mgr )
|
||||
supervisor_mgr->InitPostScript();
|
||||
|
||||
// After spinning up Broker, we have background threads running now. If
|
||||
// we exit early, we need to shut down at least Broker to get a clean
|
||||
// program exit. Otherwise, we may run into undefined behavior, e.g., if
|
||||
// Broker is still accessing OpenSSL but OpenSSL has already cleaned up
|
||||
// its state due to calling exit().
|
||||
auto early_shutdown = []
|
||||
{
|
||||
broker_mgr->Terminate();
|
||||
delete iosource_mgr;
|
||||
delete telemetry_mgr;
|
||||
};
|
||||
|
||||
if ( options.print_plugins )
|
||||
{
|
||||
early_shutdown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue