qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 47cebe349ca02adadb4ba6d3eb1aca0a75aa3129
parent 29ea37fa0602db27c87650b609c85c2de3e26864
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Fri, 18 Mar 2016 22:06:41 -0400

start work on an abi fuzzer

Diffstat:
Alisc/tools/abi.ml | 30++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/lisc/tools/abi.ml b/lisc/tools/abi.ml @@ -0,0 +1,30 @@ +(* fuzzer *) + +module R = Random + +let maxargs = 10 +let maxmems = 16 + +type _ basety = + | Char: int basety + | Short: int basety + | Int: int basety + | Long: int basety + | Float: float basety + | Double: float basety + +type _ structy = + | Field: 'a basety * 'b structy -> ('a * 'b) structy + | Empty: unit structy + +type _ abity = + | Base: 'a basety -> 'a abity + | Struct: 'a structy -> 'a abity + +let _ = + let f = open_in "/dev/urandom" in + let s = Char.code (input_char f) in + let s = Char.code (input_char f) + (s lsl 8) in + R.init s; + Printf.printf "Seed: %d\n" s; + ()