all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Copley <rcopley@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>, 37575@debbugs.gnu.org
Subject: bug#37575: 27.0.50; Segfault on redisplay
Date: Thu, 3 Oct 2019 19:38:04 +0100	[thread overview]
Message-ID: <CAPM58ogkn0-WmTsUwKt7sHXetKjfj5PiSg2k2LHuuvLo58WtLQ@mail.gmail.com> (raw)
In-Reply-To: <CAPM58ojHtfiA1A9Xamis0pNGuDTxCDumxvBX-9StB6jDYm7r2g@mail.gmail.com>

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

On Thu, 3 Oct 2019 at 19:04, Richard Copley <rcopley@gmail.com> wrote:

> On Thu, 3 Oct 2019 at 18:03, Eli Zaretskii <eliz@gnu.org> wrote:
>
> chkstk is the function that probes the stack for whether it crossed
>> the guard page at the end of the stack (a.k.a "stack overflow").  It
>> is invoked internally by alloca (except that there's no alloca
>> anywhere in sight near the code that allegedly blew up), and when
>> allocating stack-based data.
>
>
> The chktsk call is in ntdll!RtlRaiseException.
>

From "objdump -Mintel -d -C -l c:\windows\system32\ntdll.dll":

   0x0000000180051f77 <ntdll!RtlRaiseException+615>: callq  0x1800a34c0
<ntdll!__chkstk>
[...]
   0x00000001800520a4 <ntdll!RtlRaiseException+916>: callq  0x1800a35d0
<ntdll!__chkstk+272>

  However, note that it is chkstk that
>> ended up in the exception handler, which is at least weird.  IME, this
>> more often than not happens when the code longjmp's on the wrong
>> stack, which is why I asked about other threads.
>>
>
> We're nowhere near any longjmp.
>
> > And given that chkstk is a leaf function, how do you deduce anything
>> from its presence, except that there is
>> > some flaw in GDB's backtrace generation or in its debug information for
>> ntdll.dll?
>>
>> I deduce that because there should be no reason for chkstk itself to
>> crash.
>>
>
It's the debug information that is incorrect. In the ntdll.dll on my
system, chkstk itself is 77 bytes long. (As you would expect, this
function's control flow is extremely simple to follow.) But 3392 bytes,
containing several blocks of code which are not reached from chkstk, are
attributed to chkstk in the debug information. None of those code blocks
crashed. One of them invoked the exception handler.

This is a straightforward backtrace, modulo the deficiencies that an
experienced low-level programmer learns to expect.  It says that
dereferencing d raised an access violation.

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

  reply	other threads:[~2019-10-03 18:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 19:17 bug#37575: 27.0.50; Segfault on redisplay Richard Copley
2019-10-02 14:50 ` Eli Zaretskii
     [not found]   ` <CAPM58ohhyJJditvN=5qtScnMkTtXp1G=7u3xBEVwQkk=jDF6EQ@mail.gmail.com>
     [not found]     ` <83lfu17oeb.fsf@gnu.org>
2019-10-03 18:04       ` Richard Copley
2019-10-03 18:38         ` Richard Copley [this message]
2019-10-03 18:57           ` Eli Zaretskii
2019-10-03 19:19             ` Richard Copley
2019-10-03 18:44         ` Eli Zaretskii
2020-01-20 19:07         ` Stefan Kangas
2020-01-21 17:47           ` Richard Copley

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=CAPM58ogkn0-WmTsUwKt7sHXetKjfj5PiSg2k2LHuuvLo58WtLQ@mail.gmail.com \
    --to=rcopley@gmail.com \
    --cc=37575@debbugs.gnu.org \
    --cc=eliz@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.