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
fix(ffi): reject a null stream callback at registration (#825)
A C caller can pass a null function pointer to the set-callback
entries. The extern "C" fn type is non-nullable in Rust's model, so the
null was stored and later invoked on the dispatcher thread when the
first event arrived, dereferencing address 0 as a process-level fault
the unwind boundary cannot contain. Model the parameter as
Option<ThetaDataDxStreamCallback> so the null bit pattern is
representable and reject it up front with a recoverable error code. The
C ABI repr is unchanged (the null niche), so the header and exported
symbol are identical.
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments