Commit 8f6ec794 authored by George Hotz's avatar George Hotz

standalone

parent 0524ccc6
......@@ -3,6 +3,7 @@ package main
import (
"encoding/binary"
"io/ioutil"
"log"
"testing"
uc "github.com/unicorn-engine/unicorn/bindings/go/unicorn"
......@@ -10,15 +11,19 @@ import (
func TestUnicornCrash(t *testing.T) {
mu, err := uc.NewUnicorn(uc.ARCH_MIPS, uc.MODE_32|uc.MODE_BIG_ENDIAN)
check(err)
if err != nil {
log.Fatal(err)
}
// program
fn := "../mipigo/test/test.bin"
dat, err := ioutil.ReadFile(fn)
check(err)
if err != nil {
log.Fatal(err)
}
mu.MemWrite(0, dat)
// load into ram, without this (completely unrelated), it doesn't crash
// load into a map, without this (completely unrelated), it doesn't crash
ram := make(map[uint32](uint32))
for i := 0; i < len(dat); i += 4 {
value := binary.BigEndian.Uint32(dat[i : i+4])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment