verified-network-toolchain / petr4

Petr4: Formal Semantics for P4
Apache License 2.0
74 stars 20 forks source link

Memory leak #265

Open jnfoster opened 3 years ago

jnfoster commented 3 years ago

Petr4 seems to instantiate externs each time the pipeline is evaluated, not just once.

I added some logging code to dump the Eval.State and here's what I see before/after a few pings.

Externs: [c, DIGEST_QUEUE, c, c, DIGEST_QUEUE]

Externs: [c, DIGEST_QUEUE, c, DIGEST_QUEUE, c, DIGEST_QUEUE, c, c, DIGEST_QUEUE]

Externs: [c, DIGEST_QUEUE, c, DIGEST_QUEUE, c, DIGEST_QUEUE, c, DIGEST_QUEUE, c, DIGEST_QUEUE, c, c, DIGEST_QUEUE]

There is only a single c in my program, so this seems wrong.