unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Noah Lavine <noah.b.lavine@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 13074-done@debbugs.gnu.org
Subject: bug#13074: VM Segfaults with Bad `Call' Instruction
Date: Tue, 11 Dec 2012 08:32:26 -0500	[thread overview]
Message-ID: <CA+U71=M0bJUcyE8ZkkMwcrCWfW8Lsp9VurbrVKrhdGgdaT0SwA@mail.gmail.com> (raw)
In-Reply-To: <878v95exhq.fsf@gnu.org>

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

On Tue, Dec 11, 2012 at 4:42 AM, Ludovic Courtès <ludo@gnu.org> wrote:
>
> The VM does full error checking.  But there’s a difference between
> checking whether an object has the expected type, and checking whether
> an object is a well-formed ‘SCM’ object (and NULL is not a valid ‘SCM’
> object.)
>
> Guile never does the latter, and as a rule of thumb I would keep things
> this way.
>

Okay.


> The brave hacker working on a compiler can easily figure out what how to
> debug all sorts of crazy things.  :-)
>

Yes, "easily". :-)


> So I’m closing it for now.
>
> Thanks,
> Ludo’.
>
> PS: It’s still unclear to me how you ended up forging an invalid SCM
>     object.  I think you either have to generate invalid bytecode, or to
>     use (pointer->scm %null-pointer), or variants thereof.
>

I loaded a procedure on the stack, used the new-frame instruction, and then
the call instruction. When I switched the order of the first two things,
the problem went away. I must have been using uninitialized stack space.

Noah

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

      reply	other threads:[~2012-12-11 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04  3:06 bug#13074: VM Segfaults with Bad `Call' Instruction Noah Lavine
2012-12-05  3:26 ` Noah Lavine
2012-12-05 14:10   ` Ludovic Courtès
2012-12-05 14:54     ` Noah Lavine
2012-12-05 22:14       ` Ludovic Courtès
2012-12-11  4:16         ` Noah Lavine
2012-12-11  9:42           ` Ludovic Courtès
2012-12-11 13:32             ` Noah Lavine [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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to='CA+U71=M0bJUcyE8ZkkMwcrCWfW8Lsp9VurbrVKrhdGgdaT0SwA@mail.gmail.com' \
    --to=noah.b.lavine@gmail.com \
    --cc=13074-done@debbugs.gnu.org \
    --cc=ludo@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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).