proc_macro/bridge: remove client->server &HandleCounters passing.#98223
Closed
eddyb wants to merge 1 commit intorust-lang:masterfrom
Closed
proc_macro/bridge: remove client->server &HandleCounters passing.#98223eddyb wants to merge 1 commit intorust-lang:masterfrom
&HandleCounters passing.#98223eddyb wants to merge 1 commit intorust-lang:masterfrom
Conversation
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.
Just like #97461, this was inspired by @nnethercote's efforts in this area (see #97004 (comment)).
The purpose of the counters was never to protect from server-side misuse, only client-side misuse (e.g. a proc macro storing a
proc_macropublic API type in TLS), so the FIXME comment should suffice for now.As this PR removes
get_handle_counters(the only non-ZSTClientfield other thanrun, since #97461), it will allow a#[repr(transparent)]Clientthat only newtypes therunC ABI entry-pointfnpointer (and in the context of e.g. wasm isolation, that's all you want, since you can reason about it from outside the wasm VM, as just a 32-bit "function table index", that you can pass to the wasm VM to call that function).However, I haven't changed any
#[repr]attributes in this PR to avoid unforseen perf interactions.cc @mystor @bjorn3