I wanted to apply this (thanks for finding and fixing this bug!), and saw that you already did :-)
If you commit your own patches which you had previously sent to the mailing llist, please do this with "git am -m" (or equivalently add the message-id line manually) so we get mail from the bot saying that a proposed patch was already committed. Thanks! -- Nadav Har'El n...@scylladb.com On Thu, Aug 8, 2019 at 8:05 AM Waldemar Kozaczuk <jwkozac...@gmail.com> wrote: > The patch 97fe8aa3d2d8f2c938fcaa379c44ae5a80dfbf33 enhanced > OSv to start using physical memory below 2MiB. The second > MiB is part of the memory where OSv copies compressed kernel > to uncompress it later to loader.elf which means it contains > garbage (non-0). > > This one-liner patch explicitly initializes one of the fields > of the detached_state struct to 0 (which is a good practice in general). > Otherwise for unstarted threads the tcpu() method returns invalid > pointer and leads to a page fault when for example httpserver > handles /os/threads call. > > Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com> > --- > include/osv/sched.hh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/osv/sched.hh b/include/osv/sched.hh > index 39310241..66c0a44a 100644 > --- a/include/osv/sched.hh > +++ b/include/osv/sched.hh > @@ -677,7 +677,7 @@ private: > struct detached_state { > explicit detached_state(thread* t) : t(t) {} > thread* t; > - cpu* _cpu; > + cpu* _cpu = nullptr; > bool lock_sent = false; // send_lock() was called for us > std::atomic<status> st = { status::unstarted }; > }; > -- > 2.20.1 > > -- > You received this message because you are subscribed to the Google Groups > "OSv Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to osv-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/osv-dev/20190808050529.23364-1-jwkozaczuk%40gmail.com > . > -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/CANEVyjsZtGk9i6Rryy%3DG9OSJdG5fUf3VLEizCC05--fZFmAoJA%40mail.gmail.com.