| 209 | } |
| 210 | |
| 211 | static PyObject* SymSanDestroy(PyObject *self) { |
| 212 | if (__z3_parser != nullptr) { |
| 213 | delete __z3_parser; |
| 214 | __z3_parser = nullptr; |
| 215 | } |
| 216 | |
| 217 | // Clean up attached shm (from init_parser with shm name) |
| 218 | if (__attached_shm != nullptr) { |
| 219 | munmap(__attached_shm, __attached_shm_size); |
| 220 | __attached_shm = nullptr; |
| 221 | __attached_shm_size = 0; |
| 222 | } else { |
| 223 | // Only call symsan_destroy if we used init (launcher mode) |
| 224 | symsan_destroy(); |
| 225 | } |
| 226 | |
| 227 | Py_RETURN_NONE; |
| 228 | } |
| 229 | |
| 230 | // Initialize parser from shared memory (by name or address) |
| 231 | // Usage: init_parser(shm_name, size) or init_parser(shm_capsule, size) |
nothing calls this directly
no test coverage detected