New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the C plugins mechanism #1867
Conversation
The mechanism complicates the runtime system and is not very general (only a few system functions are instrumented). There are other ways to intercept system calls that are more general and require no modification to the source code of the runtime system.
configure
Outdated
-no-cplugins|--no-cplugins) | ||
;; # Ignored for backward compatibility | ||
;; # Ignored for backward compatibility; transitional? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, the -with-cplugins
and/or -no-cplugins
options could be removed altogether, causing a generic error. I have no opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I think it’s nicer to have the flag preserved with the warning. Apart from anything else, if anything like it is ever reintroduced, it means care is implied not to re-use the old flag name without considering whether the new flag has the same meaning as the old one (largely academic I expect here, of course)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think it's better to keep the error (and even remove the "transitional" comments.
Is this running through precheck? I wholly support this change. |
This PR went through CI precheck with no errors caused by the changes. (There was an unrelated error on OpenBSD 32, but it's being fixed separately.) |
Of course, at the moment this PR is missing an entry in Changes but I
assume you are waiting to make sure everybody is okay before adding it so
this is just a note so that this does not get forgotten.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
configure
Outdated
-no-cplugins|--no-cplugins) | ||
;; # Ignored for backward compatibility | ||
;; # Ignored for backward compatibility; transitional? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think it's better to keep the error (and even remove the "transitional" comments.
- Clean up configure script as suggested in review - Added Changes entry
Thanks for the feedback. I amended the configure file as suggested and added a Changes entry. Will merge when CI is green. |
The C plugins mechanism was introduced by @lefessan in #668 to support interception for some system calls in the OCaml runtime system.
Two years and a CVE later, it's unclear that this mechanism is used at all. Moreover, it complicates the runtime system and is not very general (only a few system functions are instrumented). There are other ways to intercept system calls that are more general and require no modification to the source code of the runtime system.
Following discussions with other core Caml developers, this PR proposes to just remove this plugin mechanism. Let the discussion begin!