Implements verifier and code gen for swift (#6373)

Updates test cases on linux

Adhere to new protocol naming

Adds fuzzing

Adds documentation

Adds support for string unions

Updated fuzzer generated code
This commit is contained in:
mustiikhalil
2021-05-14 20:59:28 +03:00
committed by GitHub
parent 04b10f5a3a
commit a5175c513a
38 changed files with 2291 additions and 168 deletions

View File

@@ -14,5 +14,16 @@
* limitations under the License.
*/
import Foundation
print("Flatbuffers")
import FlatBuffers
@_cdecl("LLVMFuzzerTestOneInput")
public func FuzzFlatbuffers(_ start: UnsafeRawPointer, _ count: Int) -> CInt {
let bytes = UnsafeRawBufferPointer(start: start, count: count)
do {
var buffer = ByteBuffer(contiguousBytes: bytes, count: count)
let _: Monster = try getCheckedRoot(byteBuffer: &buffer)
} catch {
}
return 0
}