about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-01-10 17:06:38 -0800
committerKartik Agaram <vc@akkartik.com>2019-01-10 17:06:38 -0800
commit8b9dd2d1a9a86eb2bca7b67cb6bd4b707d63c042 (patch)
treedd040d1ce0943c5530c9e905863211001ee131ec /subx/apps
parentf7f0d6318231ff081ed6ff2ef30d8e1823e11c70 (diff)
downloadmu-8b9dd2d1a9a86eb2bca7b67cb6bd4b707d63c042.tar.gz
4916
In the process of building slice primitives I found an out-of-bounds access
in write-byte.
Diffstat (limited to 'subx/apps')
-rwxr-xr-xsubx/apps/crenshaw2-1bin10778 -> 12007 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bbin11337 -> 12566 bytes
-rwxr-xr-xsubx/apps/factorialbin9696 -> 10925 bytes
-rwxr-xr-xsubx/apps/handlebin10489 -> 11718 bytes
-rwxr-xr-xsubx/apps/hexbin14292 -> 15521 bytes
-rw-r--r--subx/apps/hex.subx6
-rw-r--r--subx/apps/pack.subx3
7 files changed, 0 insertions, 9 deletions
diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1
index 354683d2..5d45b5fa 100755
--- a/subx/apps/crenshaw2-1
+++ b/subx/apps/crenshaw2-1
Binary files differdiff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b
index 37576192..b462d387 100755
--- a/subx/apps/crenshaw2-1b
+++ b/subx/apps/crenshaw2-1b
Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial
index 72217cdd..f5c91de1 100755
--- a/subx/apps/factorial
+++ b/subx/apps/factorial
Binary files differdiff --git a/subx/apps/handle b/subx/apps/handle
index ce489c0a..61f3e1dd 100755
--- a/subx/apps/handle
+++ b/subx/apps/handle
Binary files differdiff --git a/subx/apps/hex b/subx/apps/hex
index 936ebdce..b51a79be 100755
--- a/subx/apps/hex
+++ b/subx/apps/hex
Binary files differdiff --git a/subx/apps/hex.subx b/subx/apps/hex.subx
index 2660bd54..1d306782 100644
--- a/subx/apps/hex.subx
+++ b/subx/apps/hex.subx
@@ -41,12 +41,6 @@
     3d/compare-EAX  1/imm32
     75/jump-if-not-equal  $run-main/disp8
     # . run-tests()
-#?     e8/call test-hex-below-0/disp32
-#?     e8/call test-scan-next-byte/disp32
-#?     e8/call test-scan-next-byte-handles-eof/disp32
-#?     e8/call test-scan-next-byte-skips-comment/disp32
-#?     e8/call test-scan-next-byte-aborts-on-invalid-byte/disp32
-#?     e8/call test-convert-next-octet/disp32
     e8/call  run-tests/disp32
     8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           3/r32/EBX   Num-test-failures/disp32          # copy *Num-test-failures to EBX
     eb/jump  $main:end/disp8
diff --git a/subx/apps/pack.subx b/subx/apps/pack.subx
index b5f39009..d83a5398 100644
--- a/subx/apps/pack.subx
+++ b/subx/apps/pack.subx
@@ -121,8 +121,6 @@ $main:end:
 #   slice-equal?(slice, kernel string)
 
 # helpers:
-#   slice-empty?(in : &slice) -> bool
-#   slice-equal?(in : &slice, s : &kernel-string) -> bool
 #   is-hex-int(in : &slice)
 #   parse-hex-int(in : &slice) -> int
 #   emit-maybe(out : &buffered-file, n : int, width : int)
@@ -175,7 +173,6 @@ next-word:  # line : (address stream byte), out : (address slice)
     # out->start = &line->data[line->read]
     8b/copy                         1/mod/*+disp8   6/rm32/ESI    .           .             .           1/r32/ECX   4/disp8         .                 # copy *(ESI+4) to ECX
     8d/copy-address                 1/mod/*+disp8   4/rm32/sib    6/base/ESI  1/index/ECX   .           0/r32/EAX   0xc/disp8       .                 # copy ESI+ECX+12 to EAX
-#? $watch-1:
     89/copy                         0/mod/indirect  7/rm32/EDI    .           .             .           0/r32/EAX   .               .                 # copy EAX to *EDI
     # if line->data[line->read] == '#': out->end = &line->data[line->write]), skip rest of stream and return
     # . EAX = line->data[line->read]