Open kevindweb opened 4 years ago
Due to my own code, there is a segfault only when running manager with -s web.
-s web
Current Behavior When we run any configuration of manager with -s web, I can get it to segfault every time. The issue is caused by #82 . Key points:
Expected behavior/code We should not have segmentation faults.
Steps to reproduce
./go.sh 0,1,2,3 1 0xF0 -s web
./go.sh 1 -d 1
./go.sh 1
Environment
Possible Solution I think I found the solution, but might want to wait on it until the release is complete to add more PRs. Instead of:
cJSON_Delete(onvm_json_root); cJSON_Delete(onvm_json_events_arr);
We want:
cJSON_Delete(onvm_json_events_arr); cJSON_Delete(onvm_json_root);
My thought is that there are shared members between the two cJSON objects, and when root is deleted first, cJSON faults out on line https://github.com/sdnfv/openNetVM/blob/master/onvm/lib/cJSON.c#L1877
Bug Report
Due to my own code, there is a segfault only when running manager with
-s web
.Current Behavior When we run any configuration of manager with
-s web
, I can get it to segfault every time. The issue is caused by #82 . Key points:Expected behavior/code We should not have segmentation faults.
Steps to reproduce
./go.sh 0,1,2,3 1 0xF0 -s web
./go.sh 1 -d 1
./go.sh 1
Environment
Possible Solution I think I found the solution, but might want to wait on it until the release is complete to add more PRs. Instead of:
We want:
My thought is that there are shared members between the two cJSON objects, and when root is deleted first, cJSON faults out on line https://github.com/sdnfv/openNetVM/blob/master/onvm/lib/cJSON.c#L1877