mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/fix-fuzz-target-warnings'
* origin/topic/jsiwek/fix-fuzz-target-warnings: Fix deprecation warnings in fuzz targets Remove dbg_read_internal_state()
This commit is contained in:
commit
8f4138262f
5 changed files with 19 additions and 16 deletions
9
CHANGES
9
CHANGES
|
@ -1,4 +1,13 @@
|
||||||
|
|
||||||
|
3.3.0-dev.53 | 2020-08-05 12:35:50 -0700
|
||||||
|
|
||||||
|
* Fix deprecation warnings in fuzz targets (Jon Siwek, Corelight)
|
||||||
|
|
||||||
|
* Remove dbg_read_internal_state() (Jon Siwek, Corelight)
|
||||||
|
|
||||||
|
It's never had a definition anyway and the namespacing/deprecation
|
||||||
|
process was now causing a compile error in debug/fuzzing builds w/ GCC
|
||||||
|
|
||||||
3.3.0-dev.50 | 2020-08-04 20:22:48 +0000
|
3.3.0-dev.50 | 2020-08-04 20:22:48 +0000
|
||||||
|
|
||||||
* Fix incorrect conflict detection of namespaced-enum-names
|
* Fix incorrect conflict detection of namespaced-enum-names
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
3.3.0-dev.50
|
3.3.0-dev.53
|
||||||
|
|
|
@ -166,11 +166,6 @@ int dbg_execute_command(const char* cmd);
|
||||||
// Interactive expression evaluation.
|
// Interactive expression evaluation.
|
||||||
zeek::ValPtr dbg_eval_expr(const char* expr);
|
zeek::ValPtr dbg_eval_expr(const char* expr);
|
||||||
|
|
||||||
// Extra debugging facilities.
|
|
||||||
// TODO: current connections, memory allocated, other internal data structures.
|
|
||||||
// ### Note: not currently defined.
|
|
||||||
int dbg_read_internal_state();
|
|
||||||
|
|
||||||
// Get line that looks like "In FnFoo(arg = val) at File:Line".
|
// Get line that looks like "In FnFoo(arg = val) at File:Line".
|
||||||
std::string get_context_description(const zeek::detail::Stmt* stmt, const zeek::detail::Frame* frame);
|
std::string get_context_description(const zeek::detail::Stmt* stmt, const zeek::detail::Frame* frame);
|
||||||
|
|
||||||
|
@ -203,7 +198,6 @@ constexpr auto dbg_shutdown_debugger [[deprecated("Remove in v4.1. Use zeek::det
|
||||||
constexpr auto dbg_handle_debug_input [[deprecated("Remove in v4.1. Use zeek::detail::dbg_handle_debug_input.")]] = zeek::detail::dbg_handle_debug_input;
|
constexpr auto dbg_handle_debug_input [[deprecated("Remove in v4.1. Use zeek::detail::dbg_handle_debug_input.")]] = zeek::detail::dbg_handle_debug_input;
|
||||||
constexpr auto dbg_execute_command [[deprecated("Remove in v4.1. Use zeek::detail::dbg_execute_command.")]] = zeek::detail::dbg_execute_command;
|
constexpr auto dbg_execute_command [[deprecated("Remove in v4.1. Use zeek::detail::dbg_execute_command.")]] = zeek::detail::dbg_execute_command;
|
||||||
constexpr auto dbg_eval_expr [[deprecated("Remove in v4.1. Use zeek::detail::dbg_eval_expr.")]] = zeek::detail::dbg_eval_expr;
|
constexpr auto dbg_eval_expr [[deprecated("Remove in v4.1. Use zeek::detail::dbg_eval_expr.")]] = zeek::detail::dbg_eval_expr;
|
||||||
constexpr auto dbg_read_internal_state [[deprecated("Remove in v4.1. Use zeek::detail::dbg_read_internal_state.")]] = zeek::detail::dbg_read_internal_state;
|
|
||||||
constexpr auto get_context_description [[deprecated("Remove in v4.1. Use zeek::detail::get_context_description.")]] = zeek::detail::get_context_description;
|
constexpr auto get_context_description [[deprecated("Remove in v4.1. Use zeek::detail::get_context_description.")]] = zeek::detail::get_context_description;
|
||||||
constexpr auto debug_msg [[deprecated("Remove in v4.1. Use zeek::detail::debug_msg.")]] = zeek::detail::debug_msg;
|
constexpr auto debug_msg [[deprecated("Remove in v4.1. Use zeek::detail::debug_msg.")]] = zeek::detail::debug_msg;
|
||||||
|
|
||||||
|
|
|
@ -25,14 +25,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||||
if ( ! chunk )
|
if ( ! chunk )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Packet pkt;
|
zeek::Packet pkt;
|
||||||
auto timestamp = 42;
|
auto timestamp = 42;
|
||||||
pkt_timeval ts = {timestamp, 0};
|
pkt_timeval ts = {timestamp, 0};
|
||||||
pkt.Init(DLT_RAW, &ts, chunk->size, chunk->size, chunk->data.get(), false, "");
|
pkt.Init(DLT_RAW, &ts, chunk->size, chunk->size, chunk->data.get(), false, "");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
sessions->NextPacket(timestamp, &pkt);
|
zeek::sessions->NextPacket(timestamp, &pkt);
|
||||||
}
|
}
|
||||||
catch ( binpac::Exception const &e )
|
catch ( binpac::Exception const &e )
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,17 +18,17 @@ static zeek::Connection* add_connection()
|
||||||
static constexpr double network_time_start = 1439471031;
|
static constexpr double network_time_start = 1439471031;
|
||||||
net_update_time(network_time_start);
|
net_update_time(network_time_start);
|
||||||
|
|
||||||
Packet p;
|
zeek::Packet p;
|
||||||
ConnID conn_id;
|
zeek::ConnID conn_id;
|
||||||
conn_id.src_addr = IPAddr("1.2.3.4");
|
conn_id.src_addr = zeek::IPAddr("1.2.3.4");
|
||||||
conn_id.dst_addr = IPAddr("5.6.7.8");
|
conn_id.dst_addr = zeek::IPAddr("5.6.7.8");
|
||||||
conn_id.src_port = htons(23132);
|
conn_id.src_port = htons(23132);
|
||||||
conn_id.dst_port = htons(80);
|
conn_id.dst_port = htons(80);
|
||||||
ConnIDKey key = BuildConnIDKey(conn_id);
|
zeek::detail::ConnIDKey key = zeek::detail::BuildConnIDKey(conn_id);
|
||||||
zeek::Connection* conn = new Connection(sessions, key, network_time_start,
|
zeek::Connection* conn = new zeek::Connection(zeek::sessions, key, network_time_start,
|
||||||
&conn_id, 1, &p, nullptr);
|
&conn_id, 1, &p, nullptr);
|
||||||
conn->SetTransport(TRANSPORT_TCP);
|
conn->SetTransport(TRANSPORT_TCP);
|
||||||
sessions->Insert(conn);
|
zeek::sessions->Insert(conn);
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue