runtime: audit all assembly functions
minux opened this issue · 2 comments
minux commented
It seems we translated asm_ppc64x.s to asm_arm64.s, however,
at least we failed to replace ppc64x's closure environment register
(R11) with ours (R26).
minux commented
I did a first pass today, fixed some bugs, but I'm still
not sure all the assembly functions are correct.
but this issue is not as important as it was.
minux commented
Two more stack corruption bugs found in runtime/sys_linux_arm64.s.
(minux@4ea45ea)
After that, strings.test can pass a few tests:
$ ./strings.test -test.v
=== RUN TestCompare
--- PASS: TestCompare (0.00s)
=== RUN TestCompareIdenticalString
--- PASS: TestCompareIdenticalString (0.00s)
=== RUN TestCompareStrings
--- PASS: TestCompareStrings (0.04s)
=== RUN TestReader
--- PASS: TestReader (0.00s)
=== RUN TestReadAfterBigSeek
--- PASS: TestReadAfterBigSeek (0.00s)
=== RUN TestReaderAt
--- PASS: TestReaderAt (0.00s)
=== RUN TestReaderAtConcurrent
--- PASS: TestReaderAtConcurrent (0.00s)
=== RUN TestEmptyReaderConcurrent
--- PASS: TestEmptyReaderConcurrent (0.00s)
=== RUN TestWriteTo
--- PASS: TestWriteTo (0.00s)
=== RUN TestReplacer
--- PASS: TestReplacer (0.00s)
=== RUN TestPickAlgorithm
--- PASS: TestPickAlgorithm (0.00s)
=== RUN TestWriteStringError
--- PASS: TestWriteStringError (0.00s)
=== RUN TestGenericTrieBuilding
--- PASS: TestGenericTrieBuilding (0.00s)
=== RUN TestFinderNext
--- PASS: TestFinderNext (0.00s)
=== RUN TestFinderCreation
SIGILL: illegal instruction
PC=0x42087aad80
goroutine 1 [running]:
x0 0x0
x1 0x1
x2 0x2
x3 0x0
x4 0x4208022000
x5 0x4208000150
x6 0x48e8c
x7 0x4208000150
x8 0x0
x9 0x1
x10 0x3b9aca00
x11 0x7
x12 0x4be60
x13 0x0
x14 0x0
x15 0x0
x16 0x4208000750
x17 0x0
x18 0x0
x19 0x0
x20 0x0
x21 0x0
x22 0x0
x23 0x0
x24 0x0
x25 0x0
x26 0x0
x27 0x356333
x28 0x4208000120
x29 0x0
lr 0x42087aad80
sp 0x4208022a80
pc 0x42087aad80
fault 0x0