summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-07-14 01:22:52 +0000
committerOri Bernstein <ori@eigenstate.org>2019-07-14 01:22:52 +0000
commit34d97453258079f514c3297f88663fc23ff6e080 (patch)
treeebfdc834ff8c434eff567653bc57126e86a1c2ee /rt
parentcfb284970e8c164d43d814496a5363b92782fb15 (diff)
downloadmc-34d97453258079f514c3297f88663fc23ff6e080.tar.gz
Fix memory leak in bigparse. (Thanks, Mike)
Diffstat (limited to 'rt')
-rw-r--r--rt/abort-netbsd.s42
1 files changed, 0 insertions, 42 deletions
diff --git a/rt/abort-netbsd.s b/rt/abort-netbsd.s
deleted file mode 100644
index a4b12bb..0000000
--- a/rt/abort-netbsd.s
+++ /dev/null
@@ -1,42 +0,0 @@
-.text
-
-.globl _rt$abort_oob
-.globl __rt$abort_oob
-_rt$abort_oob:
-__rt$abort_oob:
- /* format pc */
- movq (%rsp),%rax
- movq $15,%rdx
- leaq .digitchars(%rip),%r8
- leaq .pcstr(%rip),%r9
-.loop:
- movq %rax, %rcx
- andq $0xf, %rcx
- movb (%r8,%rcx),%r10b
- movb %r10b,(%r9,%rdx)
- subq $1, %rdx
- shrq $4, %rax
- jnz .loop
- /* write abort message */
- movq $4, %rax /* write(fd=%rdi, msg=%rsi, len=%rdx) */
- movq $2, %rdi /* fd */
- leaq .msg(%rip), %rsi /* msg */
- movq $(.msgend-.msg), %rdx /* length */
- syscall
- /* kill self */
- movq $20,%rax /* getpid */
- syscall
- movq %rax, %rdi /* save pid */
- movq $37, %rax /* kill(pid=%rdi, sig=%rsi) */
- movq $6, %rsi
- syscall
-.data
-.msg: /* pc name: */
- .ascii "0x"
-.pcstr:
- .ascii "0000000000000000"
- .ascii ": out of bounds access\n"
-.msgend:
-
-.digitchars:
- .ascii "0123456789abcdef"