Conversation
The macro is only called in cmucl. It is written to raise an error if called for vararg functions. But ERR_set_error in the same file is a vararg function that results in the macro's being called. Thus the file cannot be compiled/loaded in cmucl. In the future if other Lisps also require the macro to be called, the file will not be loadable on those Lisps either, for the same reason as above. Further, this macro was created to solve a problem with cmucl's compiler being too optimising and complaining if a foreign function didn't exist in the foreign library. https://gitlab.common-lisp.net/cmucl/cmucl/-/issues/74 The fix described there was only partly implemented by cffi at the time, so this macro was necessary. But now cffi has implemented it completely (in revision a068a492892b12d54b430d93d707d663da850210) so this macro isn't necessary.
7f45344 to
d3e3cc9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ffi.lisp's
defcfun-late-boundmacro is designed to raise an error for vararg cfuns. But the same file defines exactly such a vararg cfun (err-set-error).The macro is only used on cmucl.
cl+ssl is therefore unloadable on any cmucl (regardless of cffi version and openssl version). This is a broad and true statement that follows from paragraph one alone.
This cl+ssl patch affects only cmucl. As per the previous paragraph, it cannot worsen things for any cmucl user, regardless of their cffi version and openssl version. Now I'll describe the effect of this patch on users more precisely.
I'll call cl+ssl versions without this patch "cl+ssl-unpatched" and with this patch "cl+ssl-patched".
I'll call cffi versions without the following "cffi-unpatched" and with the following "cffi-patched"
cffi/cffi#423
I'll call openssl prior to 1.1 "old-openssl" and including and after 1.1 "new-openssl".
We already know that cl+ssl-unpatched doesn't work at all.
With cl+ssl-patched,
new-openssl will work with both cffi-unpatched and cffi-patched.
old-openssl will not work with cffi-unpatched and will with cffi-patched.
Thus it is worth applying this patch to cl+ssl regardless of cffi's accepting the cffi patch, as this cl+ssl patch worsens things for nobody and improves things for many. There is only one (tiny?) group above who will not see an improvement. That group can patch their copies of cffi manually.
To reiterate, non cmucl users are entirely unaffected by this patch as a
#+cmuclread macro in cl+ssl-unpatched has them bypass this part of the code.ref: this patch's commit log