4ad/go.arm64

runtime.alt: create a minimal replacement runtime

minux opened this issue · 1 comments

We're current stuck at debugging the initialization of the complex runtime.
As of today, hello world crashes in non-deterministic way (it panics on one
thread, but segfaults in another concurrently running thread), this will severely
limit our ability to make progress (and gdb's ability to debug multithreaded
programs only makes the situation worse.)

As I said in the discussion thread, we should start with a minimal replacement
runtime, stub all the needed runtime function so that they crash the process
when called. And implement the stubbed functions in the simplest way possible
as needed.

The runtime doesn't need to support threads, in fact, we don't even need
a scheduler. Being able to run single goroutine programs should make a lot
of regression tests in /test runnable. Once those are running correctly, switch
back to the original runtime and hopefully it should just work.

We might also need to slightly adjust the milestones accordingly.

  1. blank.go with the replacement runtime
  2. most standalone and single goroutine tests in /test with the replacement runtime
  3. hello world with the real runtime (this is probably unnecessary)
  4. sieve.go with the real runtime
  5. go test strings
  6. go test std
  7. make.bash

I believe the rt has served its purpose. The big.runtime branch is getting into really
good shape now. It's time to switch the main branch from dev.arm64 to
big.runtime.