53
53
54
54
# Errata
55
55
## Edge/vertex modification
56
- Modifying/deleting vertices and edges inside f() not using submit request
56
+ Modifying/deleting vertices and edges inside f() not using submit request
57
57
can lead to undefined behavior or dead locks. This is because in CONTEXT
58
58
set to SWITCH or NONE with many starting vertices, can lead to a structure
59
59
being NULL’d with its lock destroyed while another thread is holding that lock
@@ -64,43 +64,43 @@ mitigate this problem, the client should use submit request which will handle
64
64
the requests sequentially with destroying structures last.
65
65
66
66
## Graph modification
67
- Trying to delete the graph while running will result in undefined behav-
67
+ Trying to delete the graph while running will result in undefined behav-
68
68
ior. Destroying the graph does not lock any thread and thus will cause race
69
69
conditions. The graph should be deleted only once all threads reach a sink.
70
70
71
71
## Parameter Passing
72
- Parameters passed to edges or vertices functions will be free’d immediately
72
+ Parameters passed to edges or vertices functions will be free’d immediately
73
73
after use and therefore will cause an error should they try and be accessed. To
74
74
mitigate the values may be stored in the edge’s or vertex’s global or shared
75
75
variables. Any non standard data type, such as struct, is dependent on the user
76
76
to free its content as the library will only free the pointer to the struct and the
77
77
pointer to the array of variables.
78
78
79
79
## Illegal Arguments
80
- Passing wrong values or wrong number of variables to any function will result
80
+ Passing wrong values or wrong number of variables to any function will result
81
81
in failure. A client should be aware of which vertices connect and what edges
82
82
it has and the proper handling required between such connections. Should the
83
83
client choose to dynamically add/remove vertices or edges or even modify while
84
84
running should be aware of the changes that may occur in the graph and the
85
85
resulting change in dependence on proper variable handling.
86
86
87
87
## Graph Modification (cont.)
88
- It is possible to modify the graph while it is running. To do so the client
88
+ It is possible to modify the graph while it is running. To do so the client
89
89
should submit request to add a change or pause the graph. Making any changes
90
90
externally may result in undefined behavior if done improperly. Modifying the
91
91
graph directly while running could result in failure.
92
92
Should the number of init vertex args not much the number of vertices in
93
93
the start set the program will result in an error.
94
94
95
95
## Data Structure Errata
96
- Stacks and AVLTree can take non malloc’d data and function normally
96
+ Stacks and AVLTree can take non malloc’d data and function normally
97
97
within scope of those non malloc’d data. However, in another scope the memory
98
98
will be unaddressable and thus should be malloc’d memory instead. The stack
99
99
and AVL Tree wll not free the void * data since the void * data structure is
100
100
unknown to them and thus the client should free the memory.
101
101
102
102
## SWITCH_UNSAFE
103
- Should SWITCH_USNAFE be used as the context, then the graph will run like
103
+ Should SWITCH_USNAFE be used as the context, then the graph will run like
104
104
how it runs in SWITCH, but the variables shared between the edge and the second vertex
105
105
b will be passed to the edges function. Trying to read the shared variables may lead to a
106
106
race condition in which vertex b or one/some of it's edges are modifying those varibales.
0 commit comments