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
The h3 C library does not handle the case of malloc/calloc/realloc returning NULL in a robust manner. If assertions are enabled, the library crashes, otherwise it will use the NULL pointer leading to undefined behavior. While I understand the convenience of this design in the C library, not propagating OOM errors up the stack means binding code like this is not reliable:
Users are likely to see a sudden fatal crash in the Java process and may not see any hint to the C assertion. Practically, consider using return codes to handle OOM up the stack for your C functions so you can handle them probably here.
The text was updated successfully, but these errors were encountered:
The h3 C library does not handle the case of
malloc
/calloc
/realloc
returningNULL
in a robust manner. If assertions are enabled, the library crashes, otherwise it will use the NULL pointer leading to undefined behavior. While I understand the convenience of this design in the C library, not propagating OOM errors up the stack means binding code like this is not reliable:h3-java/src/main/c/h3-java/src/jniapi.c
Line 44 in ed818d3
The text was updated successfully, but these errors were encountered: