mibk / hawk Goto Github PK
View Code? Open in Web Editor NEWan Awk clone
License: MIT License
an Awk clone
License: MIT License
This Hawk program crashes:
{i[0%0]=0
y[1]++
z[i>y]}
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x4cc1c4]
goroutine 1 [running]:
panic(0x51c440, 0xc42000e150)
/home/michal/gostable/src/runtime/panic.go:500 +0x1a1
github.com/mibk/hawk/compiler/internal/hawkc.(*Program).Run.func1(0xc420041dd0)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/internal/hawkc/syntax.go:87 +0xb6
panic(0x51c440, 0xc42000e150)
/home/michal/gostable/src/runtime/panic.go:458 +0x243
github.com/mibk/hawk/value.(*Array).Cmp(0xc4200124b0, 0x5ca0a0, 0xc42002e030, 0x1, 0x5ca0a0)
/home/michal/gopath/src/github.com/mibk/hawk/value/array.go:104 +0x254
github.com/mibk/hawk/value.(*Undefined).Cmp(0xc42002e028, 0x5ca0a0, 0xc42002e030, 0x5ca0a0, 0xc42002e030)
/home/michal/gopath/src/github.com/mibk/hawk/value/undefined.go:40 +0x165
github.com/mibk/hawk/compiler/internal/hawkc.(*BinaryExpr).Eval(0xc420010400, 0x5c8980, 0xc42002e010, 0x5ca0a0, 0xc42002e038)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/internal/hawkc/expr.go:220 +0x5ea
github.com/mibk/hawk/compiler/internal/hawkc.(*IndexExpr).Eval(0xc420010440, 0x5c8980, 0xc42002e010, 0x3, 0x3)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/internal/hawkc/expr.go:117 +0xa2
github.com/mibk/hawk/compiler/internal/hawkc.(*ExprStmt).Exec(0xc42000e540, 0x5c8980, 0xc42002e010, 0x0)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/internal/hawkc/stmt.go:30 +0x47
github.com/mibk/hawk/compiler/internal/hawkc.(*BlockStmt).Exec(0xc42000a7c0, 0x5c8980, 0xc42002e010, 0x0)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/internal/hawkc/stmt.go:40 +0x68
github.com/mibk/hawk/compiler/internal/hawkc.(*PatternAction).Exec(0xc42000a7e0, 0x5c8980, 0xc42002e010, 0x44cd50)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/internal/hawkc/syntax.go:149 +0x58
github.com/mibk/hawk/compiler/internal/hawkc.(*Program).Run(0xc42008a120, 0x5c8980, 0xc42002e010, 0x5c9180, 0xc42002e008, 0x0, 0x0)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/internal/hawkc/syntax.go:98 +0x129
github.com/mibk/hawk/compiler.(*Program).Run(0xc42008a120, 0x5c8980, 0xc42002e010, 0x5c9180, 0xc42002e008, 0x0, 0x0)
/home/michal/gopath/src/github.com/mibk/hawk/compiler/compiler.go:35 +0x55
main.main()
/home/michal/gopath/src/github.com/mibk/hawk/main.go:74 +0x4fd
This Hawk program causes stack overflow:
{y[]=y
print+y}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.