Conversation
Greptile SummaryThis PR makes defensive null-check improvements to the WholeGraph bindings:
The changes are safe for merging — no blocking issues identified. Confidence Score: 5/5
Last reviewed commit: 18054d8 |
| if global_context == NULL: | ||
| (<void **> memory_context)[0] = NULL | ||
| return |
There was a problem hiding this comment.
memory_context is dereferenced at line 428 without first checking for null. When global_context == NULL, the code writes to memory_context[0] without validating memory_context itself is non-null. Every other callback in this PR (destroy, malloc, free, output_malloc, output_free) guards against null memory_context before dereferencing. This should be consistent:
| if global_context == NULL: | |
| (<void **> memory_context)[0] = NULL | |
| return | |
| if global_context == NULL: | |
| if memory_context != NULL: | |
| (<void **> memory_context)[0] = NULL | |
| return |
|
/ok to test 64d68c3 |
|
/ok to test 18054d8 |
|
Looks like this did fix the first round of segfaults. I added a 3.14 test job for Currently: |
No description provided.