You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using CMock for a while, and sometimes CMock could cause segmentation fault or accidentally mess up the memory of local variables. This problem disappears if all the variables needed are defined globally.
Another issue is that CMock_verify() and CMock_init() can cause segmentation fault. Please take a look at this PR, I built the test runner manually, if I add one more resetTest() below the last line of bpf/tests/nat_test.h:test_snat_v4_process, that resetTest() will cause segmentation fault.
The text was updated successfully, but these errors were encountered:
xinyuannn
added a commit
to xinyuannn/cilium
that referenced
this issue
Sep 13, 2021
This commit adds a thorough test on snat_v4_process based on our ebpf
unit testing framework.
Please note that the variables used in func test_snat_v4_process are
defined globally to avoid a problem caused by CMock (issue:ThrowTheSwitch/CMock#364).
Signed-off-by: Xinyuan Zhang <zhangxinyuan@google.com>
I have been using CMock for a while, and sometimes CMock could cause segmentation fault or accidentally mess up the memory of local variables. This problem disappears if all the variables needed are defined globally.
Another issue is that CMock_verify() and CMock_init() can cause segmentation fault. Please take a look at this PR, I built the test runner manually, if I add one more resetTest() below the last line of bpf/tests/nat_test.h:test_snat_v4_process, that resetTest() will cause segmentation fault.
The text was updated successfully, but these errors were encountered: