Skip to content

swift_desanitizeMetadata(__)

0x41c edited this page Feb 28, 2022 · 2 revisions

swift_desanitizeMetadata(_:)

Given some metadata, this will pass it through a cast in C++ to give back a pointer to the metadata, and allow it to by bound to a custom type. This allows asan to be happy about reading what could potentially be out of bounds memory.

@_silgen_name("swift_desanitizeMetadata")
public func swift_desanitizeMetadata<T>(_ metadata: Any.Type) -> UnsafeMutablePointer<T> 

Parameters

  • metadata: The metadata to desanitize from asan.

Returns

A pointer to whatever type you want to bind the metadata to.

Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally