9front - general discussion about 9front
 help / color / mirror / Atom feed
From: jamos@oboj.net
To: <9front@9front.org>
Subject: Re: [9front] ACHTUNG! CRITICAL PATCH! PLEASE APPLY!
Date: Sun, 09 Jul 2017 18:33:45 +0200	[thread overview]
Message-ID: <a00870502a15ac50d85d29289e6e934d@oboj.net> (raw)
In-Reply-To: <CAMVULc7XpfRSFhop_pphcefVwmyxZDjtZ+2_3V5gZJM5Yqp4XA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

 

I am not at all an expert on this, so maybe some one else
on the
list might enlighten us, but given what you wrote I
did some
experiments. I added a local variable in the function
suspproc()
allocating some extra space on the stack. 

Without setting a bigger
font, it seems to be possible to allocate
another 17 bytes on the stack
without crashing. Upon allocating
an array of 18 bytes, it crashes for
me. 

So it looks like the programmer allocated exactly the amount
of
headroom needed (at that time) and nothing more. It is
quite plausible
that something that is bigger in a 64bit world
(larger datatypes or
alignment padding) could consume those
few extra bytes. 

It would be
interesting to hear if there has been similar problems
with other
programs, e.g. while converting to amd64, and how
you usually determine
how much of stack to allocate, by trial and
error, or by calculating?


Jonas 

2017-07-09 08:51 skrev Alex Musolino: 

>> What caused you to
find the bug? Maybe some other means than with changing the font.
> 
> I
also use a non-default font but have only recently started using
> amd64
kernels. If I changed back to /lib/fonts/bit/vga/unicode.font I
> don't
see the problem anymore. Originally I thought that the larger
> size of
pointers on amd64 was causing the stack to be exhausted, but
> now I'm
not sure what's going on. There seems to be nothing obviously
>
font-related in the suspproc thread.
> 
> --
> Cheers,
> Alex Musolino



[-- Attachment #2: Type: text/html, Size: 1995 bytes --]

      reply	other threads:[~2017-07-09 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 14:23 Alex Musolino
2017-07-08 19:46 ` [9front] " jamos
2017-07-09  6:51   ` Alex Musolino
2017-07-09 16:33     ` jamos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a00870502a15ac50d85d29289e6e934d@oboj.net \
    --to=jamos@oboj.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).