Repository navigation
0.7.1: the program ends as the image ends it, and an image file an image starts is entered by the runner's loader - #43
Merged
Merged
Conversation
Sunrisepeak
force-pushed
the
okrun-0.7.1
branch
from
November 19, 2026 12:14
825e1ac to
6537a32
Compare
…uests are taken once the image is loaded Where the image's main returns, and where the image calls kal_exit, the runner asks its task that waits for the requests to end to return and joins it before it ends the program (stop_watching, run/src/waits.cpp): the program ends as the image ends it, with the image's tasks alone. GDB resumes each task in turn when continued; under 0.7.0 the program the image ended was gone before GDB resumed the runner's task, and GDB 15 stopped with "Couldn't get registers: No such process" instead of the program's end (10 of 12 runs of the release workflow's probe, which failed the linux-x86_64 binaries of 0.7.0; 12 of 12 end normally now). The requests are taken once the image is loaded rather than before: a start that is refused returns with the program's requests as they were, which a program of the system that runs images through libokrun keeps. A release's programs are built over openkal-platform 0.31.1, whose group holds this release and openkal-macos 0.24.1: on macOS the runner's task acts on a request, and 0.24.0 ended the program with 143 before the request's own delivery in one run of two of end_request.py. Test: examples/exits (an image whose main calls kal_exit) and tools/tests/debugger_end.py, which stops GDB before the end of examples/hello and examples/exits, steps off the stop and continues, twenty times each: every run ends normally (0.7.0: 1 of 12 for each). CI runs it on both Linux hosts of the run job. Every member is 0.7.1.
Sunrisepeak
force-pushed
the
okrun-0.7.1
branch
from
November 19, 2026 12:28
6537a32 to
22c78a6
Compare
…r, and the image's name is absolute (#42) The system runs the bytes of a file it starts as a program of its own, and an image is not one: an image's start of an image file ended by SIGSEGV on Linux and was no program elsewhere. The runner now answers kal_process_spawn (run/build.mcpp). A file that is an image (the OPENKAL requirements note) or an okb (okb.json) is started through the loader okrun_options names, as okrun [--require-signature] [--trust <key>]... --argv0=<argv[0]> -- <image> <argv[1]>... so the started image observes the vector its starter gave (openkal clause 7.6) and is held to the runner's signature requirements. The file is first asked what the loader will ask, so a start that cannot happen is refused by its reason: kal_err_not_program (another architecture, a later format, interfaces this system's openkal does not provide), kal_err_permission (a signature requirement). Any other file is started as given, once its first bytes and ELF notes are read. A program that names no loader, one that carries its image among them, refuses an image file as kal_err_not_program. - okrun_options gains `loader'; okrun names itself, and takes `--argv0'. - The image's name (kal_env_image) is the name the implementation resolves its file to, absolute, so an image that starts itself by it starts the same program wherever it then works. - examples/starts starts itself and exits.oke, and a program of the system named on its command line; CI runs it on the four machines, signed under a signature requirement (the unsigned image it starts is refused as kal_err_permission), and from okrun-host's new `file' mode, which names no loader. Under the runner before this change the image's starts of itself and of exits.oke ended by a signal.
…ts the image's lines before judging them cmd.exe given its own name as C:/Windows/System32/cmd.exe answered 'The syntax of the command is incorrect.' (run 44538697059, windows-x86_64), so the program of the system the image starts is named C:\Windows\System32\cmd.exe; the vector reaches it as given. The first start no longer ends the step before its output is shown.
…me on every Linux runner
Sunrisepeak
added a commit
to mcpplibs/mcpp-index
that referenced
this pull request
Nov 19, 2026
Lists openkal-macos 0.24.1 again; a revert of #847. From mcpp 2026.11.19.1 a range request for a member of a version group resolves to the group's version (mcpp-community/mcpp#956), so a macOS row under openkal-platform 0.31.0 keeps openkal-macos 0.24.0 while 0.24.1 is listed. Under mcpp 2026.11.18.1 the range of mcpplibs.os takes the newest version and the platform's version group refuses the build, which is why the entry was withdrawn. The entry precedes openkal-platform 0.31.1 rather than joining it in one change: openkal-image 0.7.1 (mcpplibs/openkal-image#43) resolves openkal-macos through `^0.24.0` from the published index, and its macOS check needs 0.24.1 listed; the platform names openkal-image 0.7.1 and follows its release. The tarball digest is the one #846 recorded, measured again on GitHub and GitCode (`0faf3daf…7482a4`).
Sunrisepeak
added a commit
to mcpplibs/mcpp-index
that referenced
this pull request
Nov 19, 2026
…runner's loader, and the program ends as the image ends it (#850) openkal-ld, openkal-run, openkal-tools and openkal-bind 0.7.1: one tag and one archive (mcpplibs/openkal-image#43). - An image file or an okb that an image starts is entered through the loader the runner names, held to the runner's signature requirements, with the vector its starter gave; a start that cannot happen is refused by its reason, and the image's name (`kal_env_image`) is absolute (mcpplibs/openkal-image#42). Under 0.7.0 the start ended by SIGSEGV on Linux. - The runner takes the requests to end once the image is loaded, and its task that waits for them returns before the program ends: GDB 15, continued to the end, sees the program end as the image ended it. The archive's digest (`a64b164a…b1af`) is measured on GitHub and on GitCode (mcpp-res/openkal-image 0.7.1). The dependencies are those of 0.7.0, the openkal 0.26 family. openkal-platform 0.31.1, which names this release and openkal-macos 0.24.1 (#849), follows.
Sunrisepeak
added a commit
to mcpplibs/openkal-platform
that referenced
this pull request
Nov 20, 2026
…nd as the image makes it and an image an image starts (#40) A patch of the version group with two members; no other member changes, and the platform requires mcpp 2026.11.17.1, as 0.31.0 does. - **openkal-image 0.7.1** (the carrier `openkal-run`, the tools `okld`, `okrun`, `okprof`, and the build dependency `openkal-tools`; mcpplibs/openkal-image#43). An image file or an okb that an image starts is entered through the loader the runner names, held to the runner's signature requirements, with the vector its starter gave, and the image's name is absolute (mcpplibs/openkal-image#42); under 0.7.0 the start ended by SIGSEGV on Linux. The runner takes the requests to end once the image is loaded, and its task that waits for them returns before the program ends: GDB 15, continued to the end, sees the program end as the image ended it (under 0.7.0 it stopped with "Couldn't get registers: No such process"). - **openkal-macos 0.24.1** (mcpplibs/openkal-macos#52, #54). A request acted on by a context other than the program's first ends the program as the request. The runner's task is such a context; under 0.24.0 the program's exit came before the request's own delivery, and of twenty copies nine ended by the request and eleven with status 143. Both members are in the published index (mcpplibs/mcpp-index#849, #850). Under mcpp 2026.11.19.1 a range request for a member of a version group resolves to the group's version (mcpp-community/mcpp#956), so projects that name 0.31.0 keep openkal-macos 0.24.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two corrections of the runner, released together as 0.7.1.
The program ends as the image ends it
Where the image's main returns, and where the image calls
kal_exit, the runner asks its task that waits for the requests to end to return and joins it before it ends the program (stop_watching,run/src/waits.cpp). The program ends as the image ends it, with the image's tasks alone.GDB resumes each task in turn when continued. Under 0.7.0 the program the image ended was gone before GDB resumed the runner's task, and GDB 15 stopped with "Couldn't get registers: No such process" instead of the program's end: 10 of 12 runs of the release workflow's probe, which failed the linux-x86_64 binaries of 0.7.0 (run 44510012348). With this change 12 of 12 end normally.
The requests are taken once the image is loaded rather than before it. A start that is refused returns with the program's requests as they were, which a program of the system that runs images through libokrun keeps.
next,continue)debugger_end.py, examples/hello (stopokld_finalise)debugger_end.py, examples/exits (stopown_kal_exit)end_request.py(record, status,takes)An image file an image starts is entered by the runner's loader (#42)
The system runs the bytes of a file it starts as a program of its own, and an image is not one: an image's start of an image file ended by SIGSEGV on Linux and was no program elsewhere. The runner now answers
kal_process_spawn(run/build.mcpp), through whichposix_spawn,execveandsystemof the C library reach the system. A file that is an image (the OPENKAL requirements note) or an okb (okb.json) is started through the loaderokrun_options::loadernames, as--argv0, and is held to the runner's signature requirements.kal_err_not_program(another architecture, a later format, interfaces this system's openkal does not provide) orkal_err_permission(a signature requirement). The handle is the loader's, and its status is the image's.kal_err_not_program; it starts itself by its own name, a program of the system.kal_env_image) is the name the implementation resolves its file to, absolute, so an image that starts itself by that name starts the same program wherever it then works./proc/self/exenames the runner, as it names any loader;kal_env_imageis the image's.examples/startsunder okrun, Linux x86-64kal_env_image,argv = {as-started, child}argv[0]isas-startedexits.okebeside it/bin/sh -c "exit 5"--require-signature --trust <key>: itself; the unsignedexits.okekal_err_permissionokrun-host file, which names no loaderkal_err_not_programCI runs
examples/startson the four machines of the run job (a program of the system:/bin/shon Linux and macOS,cmd.exeon Windows), signed under a signature requirement, and fromokrun-host file.Every member is 0.7.1. A release's programs are built over openkal-platform 0.31.1, whose version group holds this release and openkal-macos 0.24.1.