Commit graph

9501 commits

Author SHA1 Message Date
Jon Siwek
794748dda8 Add missing expr_name: vector_coerce 2019-07-18 19:39:16 -07:00
Zeke Medley
63a3f4e5bc Ignore abs-path in test. 2019-07-18 16:30:42 -07:00
Robin Sommer
004347b853 Merge remote-tracking branch 'origin/topic/zeke/closures'
* origin/topic/zeke/closures:
  Use BROKER_PORT.
  Update baseline to reflect new anonymous function naming.
  Sync 3rd party.
  Allow serialization of closures over Broker.
  remove some leftover debug output
  Call parent constructor from LambdaExpr.
  Table defaults capture closures.
  Make ClosureFrame safe & cleanup
  Update tests to reflect new error msg.
  ClosureFrame takes ownership of its captured vals.
  Lambdas selectively clone from the closure.
  Add lambda expressions with closures to Zeek.
2019-07-18 22:53:12 +00:00
Zeke Medley
6023157693 Report argument # type check failed on. 2019-07-18 15:22:15 -07:00
Zeke Medley
d3574d231b Update test baseline. 2019-07-18 14:06:34 -07:00
Zeke Medley
8a451a24e3 Improve func arg type checking. 2019-07-18 12:20:52 -07:00
Zeke Medley
0ca6b3e013 &expire_func(table, arg1, arg2, ...) + type checking. 2019-07-18 12:11:27 -07:00
Tim Wojtulewicz
e860a4b22d Change container iterators to just use pointers directly into the container elements 2019-07-17 11:04:45 -07:00
Zeke Medley
1692be4c2d Fix bug in selective cloning. 2019-07-16 15:15:05 -07:00
Jon Siwek
4bdcde52bd Support old plugins that use files within the source/build tree
Plugins that were made using an older skeleton (e.g. from Bro 2.5.x)
may still reference "bro-config.h", "bro-path-dev", or "bro" from the
build tree, so we can simply provide compatibility symlinks/wrappers
for the new files that use "zeek" in their names.
2019-07-16 10:10:37 -07:00
Robin Sommer
c22edc28a5 Merge remote-tracking branch 'origin/topic/zeke/README'
Includes light edit pass.

* origin/topic/zeke/README:
  Add plaintext README file.
  Fix try.zeek.org link
  Improve readability of plaintext.
  Tone down HTML and improve development section.
  Remove development paragraph.
  Update README.
2019-07-16 16:08:57 +00:00
Robin Sommer
a45cc53892 Merge remote-tracking branch 'origin/topic/jsiwek/fix-enumtype-shallow-clone'
* origin/topic/jsiwek/fix-enumtype-shallow-clone:
  Fix ref-counting bug in EnumType copy ctor
2019-07-16 15:34:45 +00:00
Robin Sommer
0639fdcd45 Merge remote-tracking branch 'origin/topic/jsiwek/remove-unused-broobj-member'
* origin/topic/jsiwek/remove-unused-broobj-member:
  Remove unused BroObj::in_ser_cache member
2019-07-16 15:19:16 +00:00
Jon Siwek
8c45937798 Merge branch 'topic/jsiwek/template-containers-merge'
* topic/jsiwek/template-containers-merge:
  Fix a potential usage of List::remove_nth(-1)
  Change List::remote(const T&) to return a bool
  Fix debug build due to old int_list usage within assert
  Convert uses of loop_over_list to ranged-for loops
  Remove loop_over_queue (as an example for later removing loop_over_list)
  Change int_list in CCL.h to be a vector, fix uses of int_list to match
  Remove List<> usage from strings.bif
  Replace uses of the old Queue/PQueue generation code with new template versions
  Convert BaseQueue/Queue/PQueue into templates, including iterator support
  Replace uses of the old Dict generation code with new template versions
  Convert PDict into template
  Replace uses of the old List generation code with new template versions
  Convert BaseList/List/PList into templates, including iterator support

* Generally squashed fixups from topic/timw/template-containers

* Add missing include file in List.h: <cassert>
2019-07-15 19:51:27 -07:00
Jon Siwek
5db772aa5e Fix a potential usage of List::remove_nth(-1) 2019-07-15 19:00:24 -07:00
Jon Siwek
ee95fd2801 Change List::remote(const T&) to return a bool
It now indicates whether the removal took place or not, depending
on whether a matching element was found in the list.
2019-07-15 19:00:24 -07:00
Jon Siwek
7ccf3c0a69 Fix debug build due to old int_list usage within assert 2019-07-15 19:00:24 -07:00
Tim Wojtulewicz
e51f02737b Convert uses of loop_over_list to ranged-for loops 2019-07-15 19:00:24 -07:00
Tim Wojtulewicz
bf70dad395 Remove loop_over_queue (as an example for later removing loop_over_list) 2019-07-15 19:00:15 -07:00
Tim Wojtulewicz
a4e2cfa2be Change int_list in CCL.h to be a vector, fix uses of int_list to match 2019-07-15 18:58:48 -07:00
Tim Wojtulewicz
e25caa2666 Remove List<> usage from strings.bif 2019-07-15 18:58:48 -07:00
Tim Wojtulewicz
efa7dbf76b Replace uses of the old Queue/PQueue generation code with new template versions 2019-07-15 18:58:48 -07:00
Tim Wojtulewicz
776da8cb9e Convert BaseQueue/Queue/PQueue into templates, including iterator support 2019-07-15 18:58:05 -07:00
Tim Wojtulewicz
50943a580c Replace uses of the old Dict generation code with new template versions 2019-07-15 18:54:07 -07:00
Tim Wojtulewicz
e2feec52be Convert PDict into template 2019-07-15 18:54:07 -07:00
Tim Wojtulewicz
237c7e4e15 Replace uses of the old List generation code with new template versions 2019-07-15 18:54:07 -07:00
Tim Wojtulewicz
29836b47d0 Convert BaseList/List/PList into templates, including iterator support 2019-07-15 18:54:07 -07:00
Jon Siwek
0058c27bcf Remove unused BroObj::in_ser_cache member 2019-07-15 17:29:20 -07:00
Jon Siwek
db5b73cb8a Fix ref-counting bug in EnumType copy ctor
Which was used by the new ShallowClone method and causes multiple enum
declarations/definitions to now crash.  Such code is not typically
seen in scripts, but being able to define an enum in both .bif and
.bro files has historically been supported.
2019-07-15 12:42:56 -07:00
Zeke Medley
b767d18ee0 Merge branch 'master' of https://github.com/zeek/zeek into topic/zeke/README 2019-07-15 10:27:56 -07:00
Zeke Medley
e8706a9c9f Add plaintext README file. 2019-07-15 09:15:29 -07:00
Jon Siwek
50e4da74cf Fix canonification of timestamps with a decisecond multiple
Unit tests sometimes use current_time(), which occassionally lands on
a perfect tenth of a second and end up fooling the old canonification
regexp and resulting in output which differs from what's in the
test baseline.
2019-07-12 18:24:56 -07:00
Zeke Medley
14bd9ff923 Fix try.zeek.org link 2019-07-12 18:06:53 -07:00
Zeke Medley
684dec9452 Improve readability of plaintext. 2019-07-12 18:00:58 -07:00
Zeke Medley
20e7a19119 Tone down HTML and improve development section. 2019-07-12 17:47:51 -07:00
Zeke Medley
ef75092875 Use BROKER_PORT. 2019-07-12 16:00:12 -07:00
Johanna Amann
d43af755b5 Merge remote-tracking branch 'origin/topic/timw/json-coverity'
* origin/topic/timw/json-coverity:
  Fix a couple of resource leaks from JSON changes
2019-07-12 15:02:38 -07:00
Tim Wojtulewicz
5d37428819 Fix a couple of resource leaks from JSON changes 2019-07-12 14:31:40 -07:00
Zeke Medley
db8379edc2 Update baseline to reflect new anonymous function naming. 2019-07-12 14:07:57 -07:00
Johanna Amann
db79041b19 Merge remote-tracking branch 'origin/topic/timw/157-global-attributes'
* origin/topic/timw/157-global-attributes:
  GH-157: Mark some attributes as not allowed for global variables

Fixes GH-157
2019-07-12 13:45:22 -07:00
Zeke Medley
b83fb5cf95 Sync 3rd party. 2019-07-12 11:12:42 -07:00
Zeke Medley
8d9355eb51 Merge branch 'master' of https://github.com/zeek/zeek into topic/zeke/closures 2019-07-12 10:33:43 -07:00
Zeke Medley
f0798c4b49 Allow serialization of closures over Broker.
anonymous-functions, their closures, can now be sent over broker.
In order to send an anonymous function the receiver must have parsed
a definition of the functon, but it need not to have been evaluated.
See testing/btest/language/closure-sending.zeek for an example of how
this can be done.

This also sends their closures as well as the closures of regular
functions.
2019-07-12 10:31:40 -07:00
Johanna Amann
a26bb85ed5 Merge remote-tracking branch 'origin/topic/jsiwek/fix-uncaught-val-cloning-exceptions'
* origin/topic/jsiwek/fix-uncaught-val-cloning-exceptions:
  Fix uncaught exceptions from Val cloning failures
2019-07-12 08:56:51 -07:00
Jon Siwek
e5e84041b7 Fix uncaught exceptions from Val cloning failures 2019-07-11 16:55:39 -07:00
Tim Wojtulewicz
ec4913ac18 GH-157: Mark some attributes as not allowed for global variables 2019-07-11 13:34:39 -07:00
Johanna Amann
418ab0e33a Merge remote-tracking branch 'origin/topic/jsiwek/zeekenv-static-local-fix'
* origin/topic/jsiwek/zeekenv-static-local-fix:
  Fix potential thread safety issue with zeekenv util function
2019-07-11 13:30:50 -07:00
Jon Siwek
a2c7ed5ff6 Merge branch 'topic/hui/dnp3-fix' of https://github.com/hugolin615/zeek
* 'topic/hui/dnp3-fix' of https://github.com/hugolin615/zeek:
  fixed some bugs on dnp3 analyzer

Adjusted some inconsistent whitespace.

Fixes GH-421
2019-07-11 13:18:58 -07:00
Jon Siwek
cb292af84d Fix a sign-compare compiler warning 2019-07-11 12:14:27 -07:00
Jon Siwek
9a72a7117d Fix potential thread safety issue with zeekenv util function
Observed segfault accessing the local static std::map of zeekenv() from
a logging thread, but only in non-debug builds using Apple/Clang
compiler, not in a debug build or GCC.  Don't quite get this behavior
since static local variable initialization is supposed to be thread-safe
since C++11, but moving to a global static works and is "more efficient"
anyway since there's no longer any run-time overhead.
2019-07-11 11:41:50 -07:00