<oriansj>stikonas: looks like it fixed the bug introduced by 435dc609438f0ca260fd9524e5d88ab743187e3a so merged <stikonas>yes, before that commit some exit statuses were ignored, but it broke crash detection... <oriansj>glad to see more details are being properly addressed. <stikonas>on the other hand, I'm not sure what causes mes-m2 to crash on risc-v... <stikonas>somehow malloc fails to reserve memory and returns 0 pointer <oriansj>well mes-m2 is much harder to reason about than all of stage0-posix put together. <oriansj>as interpreters are harder to reason about than compilers <stikonas>in general yes, but this crash happens really early in mes init before any complicated stuff is reached <stikonas>but yes, mes-m2 is definitely much more complicated than m2-planet ***stikonas_ is now known as stikonas
<muurkha>well, maybe it would be fairer to call it a prototype. it can run programs compiled with clang though <stikonas>well, we don't support riscv32 in stage0-posix yet <stikonas>somebody has to do it, but should be easy enough <gbrlwck>in mes-m2: what is char **envp? it is passed from main to init but seems unused? <muurkha>yeah, a few (mostly very old) C programs depend on this way of providing the environment <muurkha>remember that in the early days of C there wasn't much of a standard library. vi predates malloc() <muurkha>not sure when getenv() and family were born <stikonas>do we actually need to support those very old C programs? <stikonas>is there something in live-bootstrap that does not use getenv()? <fossy>dosent stage0-POSIX use envp <gbrlwck>what is the "location" argument used for in try_open_boot? <gbrlwck>what would be the benefit of changing the envp thing? <gbrlwck>but it's only used in that debugging output <stikonas>oh, I think it has to match paths in open_boot <stikonas>so try_open_boot indeed only uses it for debugging <stikonas>but if you look at open_boot there are a few invocation of try_open_boot with different arguments <gbrlwck>yeah, i guess it's just a hint on why a file has been tried