mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/3316-exit-earlier-on-errors'
* origin/topic/awelzel/3316-exit-earlier-on-errors: zeek-setup: Early exit when parsing failed
This commit is contained in:
commit
21024c22e0
3 changed files with 17 additions and 2 deletions
12
CHANGES
12
CHANGES
|
@ -1,3 +1,15 @@
|
|||
6.1.0-dev.484 | 2023-10-02 11:44:21 -0700
|
||||
|
||||
* zeek-setup: Early exit when parsing failed (Arne Welzel, Corelight)
|
||||
|
||||
When there are errors reported during yyparse(), Zeek still continued
|
||||
running initialization functions like init_general_global_var(), init_net_var()
|
||||
and run_bif_initializers(). These usually call abort() in unexpected
|
||||
situations causing misleading and confusing errors. This patch prevents
|
||||
this by exiting earlier.
|
||||
|
||||
Closes #3316
|
||||
|
||||
6.1.0-dev.482 | 2023-10-02 11:42:58 -0700
|
||||
|
||||
* broker/Manager: Fix deletion of composite keys (Arne Welzel, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
6.1.0-dev.482
|
||||
6.1.0-dev.484
|
||||
|
|
|
@ -820,13 +820,16 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
// when we actually end up reading interactively from stdin.
|
||||
set_signal_mask(false);
|
||||
run_state::is_parsing = true;
|
||||
yyparse();
|
||||
int yyparse_result = yyparse();
|
||||
run_state::is_parsing = false;
|
||||
set_signal_mask(true);
|
||||
|
||||
RecordVal::DoneParsing();
|
||||
TableVal::DoneParsing();
|
||||
|
||||
if ( yyparse_result != 0 || zeek::reporter->Errors() > 0 )
|
||||
exit(1);
|
||||
|
||||
init_general_global_var();
|
||||
init_net_var();
|
||||
run_bif_initializers();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue