Skip to main content

prepare_current_thread

Function prepare_current_thread 

Source
pub fn prepare_current_thread()
Expand description

Restore V8’s read-only protection-key defaults on the current thread.

Executor and maintenance threads may descend from fixed host workers that existed before V8 allocated its pkeys. Linux preserves each parent’s PKRU value across clone, so such descendants can otherwise fault merely reading V8’s process-wide code-pointer tables. Call this after platform init and before the thread first enters V8.