Difference between these stack traces is that free_btf is called twice - once inside psabpf_value_set_get_next_entry and second time in psabpf_value_set_context_free. free_btf should be called only once in the later function.
There is second problem in psabpf_value_set_get_next_entry - each entry returned by this function must be freed, otherwise there is a memory leak.
PVS definition (instance must be used later in the parser code):
value_set<bit<16>>(4) pvs;
Command to read PVS:
psabpf-ctl value-set get pipe 1 IngressParserImpl_p_pvs
value_set
in the parser.Exit code: 134
Stack trace leading to
free_btf
(line numbers after applying PR #68):Second stack trace leading to
free_btf
:Difference between these stack traces is that
free_btf
is called twice - once insidepsabpf_value_set_get_next_entry
and second time inpsabpf_value_set_context_free
.free_btf
should be called only once in the later function.There is second problem in
psabpf_value_set_get_next_entry
- each entry returned by this function must befree
d, otherwise there is a memory leak.PVS definition (instance must be used later in the parser code):
Command to read PVS: