Merge remote-tracking branch 'origin/topic/jsiwek/bit-1909'

I've moved the resizing loop into a static method of RecordVal.

* origin/topic/jsiwek/bit-1909:
  BIT-1909: fix invalid redef'd record field accesses
This commit is contained in:
Robin Sommer 2018-04-27 10:35:37 -07:00
commit 8df77aee09
13 changed files with 114 additions and 6 deletions

View file

@ -965,6 +965,11 @@ public:
unsigned int MemoryAllocation() const override;
void DescribeReST(ODesc* d) const override;
// Extend the underlying arrays of record instances created during
// parsing to match the number of fields in the record type (they may
// mismatch as a result of parse-time record type redefinitions.
static void ResizeParseTimeRecords();
protected:
friend class Val;
RecordVal() {}
@ -976,6 +981,8 @@ protected:
RecordType* record_type;
BroObj* origin;
static vector<RecordVal*> parse_time_records;
};
class EnumVal : public Val {