From: Dmitry Antipov <dmantipov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 18473@debbugs.gnu.org
Subject: bug#18473: 24.4.50; SEGFAULT when vconcatting more than 2048 vectors
Date: Mon, 15 Sep 2014 19:04:37 +0400 [thread overview]
Message-ID: <54170005.6080405@yandex.ru> (raw)
In-Reply-To: <jwvlhplf39a.fsf-monnier+emacsbugs@gnu.org>
On 09/15/2014 05:09 PM, Stefan Monnier wrote:
> I'm not thrilled at the idea of having to call backtrace_top every time,
> instead of just using "specpdl_ptr - 1". I'd much rather compute
> specpdl_ptr - 1 before calling USE_SAFE_ALLOCA, for example.
Hm...this simple fix:
=== modified file 'src/eval.c'
--- src/eval.c 2014-09-02 06:29:01 +0000
+++ src/eval.c 2014-09-15 14:57:18 +0000
@@ -2136,6 +2136,7 @@
/* Pass a vector of evaluated arguments. */
Lisp_Object *vals;
ptrdiff_t argnum = 0;
+ union specbinding *pdl = specpdl_ptr - 1;
USE_SAFE_ALLOCA;
SAFE_ALLOCA_LISP (vals, XINT (numargs));
@@ -2151,8 +2152,8 @@
gcpro3.nvars = argnum;
}
- set_backtrace_args (specpdl_ptr - 1, vals);
- set_backtrace_nargs (specpdl_ptr - 1, XINT (numargs));
+ set_backtrace_args (pdl, vals);
+ set_backtrace_nargs (pdl, XINT (numargs));
val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals);
UNGCPRO;
causes bootstrap crash (with emacs-24). Hard to explain why, huh?
> BTW, don't we have the same problem for the subsequent call to
> backtrace_debug_on_exit (and this one is worse because it is shared
> among all the different kinds of calls, so we *really* don't want to
> slow it down).
IIUC this applies only to apply_lambda, where we call to backtrace_debug_on_exit
between SAFE_ALLOCA_LISP and SAFE_FREE.
Dmitry
next prev parent reply other threads:[~2014-09-15 15:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 2:37 bug#18473: 24.4.50; SEGFAULT when vconcatting more than 2048 vectors Michael Welsh Duggan
2014-09-14 17:10 ` Dmitry Antipov
2014-09-15 6:38 ` Dmitry Antipov
2014-09-15 13:09 ` Stefan Monnier
2014-09-15 15:04 ` Dmitry Antipov [this message]
2014-09-15 19:15 ` Stefan Monnier
2014-09-16 4:19 ` Dmitry Antipov
2014-09-23 15:52 ` Paul Eggert
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=54170005.6080405@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=18473@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.