Matt Caswell <m...@openssl.org> wrote: > PR11589 makes a change to the public API function > `SSL_set_record_padding_callback` to change its return type from void to > int: > > https://github.com/openssl/openssl/pull/11589 > > This is technically an API break - but it doesn't seem too serious. It's > possible, I suppose, that existing applications that use this will fail > to spot the error return since this function can now fail. The function > itself was only recently added (in 1.1.1), and I suspect real-world > usage is very small (or possibly nil). > > Is this considered ok? >
This kind of change might cause memory unsafety issues unless the application is recompiled. At least, it's worth investigating that. On most platforms the ABI of a function that returns `void` and one that returns `int` is the same, from the perspective of a caller that doesn't expect or use the return value. I seem to vaguely remember in the past that there was at least one common platform where that isn't true though. Unfortunately I cannot remember which one it is. I also don't remember if it is problematic to change from "int" to "void" or "void" to "int" or both. Anyway, my point is that you should consider this an ABI-breaking change, not just an API breaking one. Cheers, Brian