unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 58232@debbugs.gnu.org
Subject: bug#58232: 29.0.50; alloc.c:879: assertion failed: 0 < item_size && 0 < nitems_incr_min && 0 <= n0 && -1 <= nitems_max
Date: Sun, 02 Oct 2022 15:17:52 +0530	[thread overview]
Message-ID: <87mtaemu9j.fsf@gmail.com> (raw)
In-Reply-To: <834jwm36kz.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Oct 2022 12:42:04 +0300")

[Sunday October 02, 2022] Eli Zaretskii wrote:

> Ouch!  Please try the patch below.

The patch works, thanks!

> diff --git a/src/emacs.c b/src/emacs.c
> index 91bf0a9..00c381a 100644
> --- a/src/emacs.c
> +++ b/src/emacs.c
> @@ -932,7 +932,7 @@ load_pdump (int argc, char **argv)
>  	exenamelen = prefix_length;
>      }
>    ptrdiff_t needed = exenamelen + strlen (suffix) + 1;
> -  dump_file = xpalloc (NULL, &bufsize, needed - bufsize, -1, 1);
> +  dump_file = xpalloc (NULL, &bufsize, max (1, needed - bufsize), -1, 1);
>    memcpy (dump_file, emacs_executable, exenamelen);
>    strcpy (dump_file + exenamelen, suffix);
>    result = pdumper_load (dump_file, emacs_executable);





  reply	other threads:[~2022-10-02  9:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01 16:33 bug#58232: 29.0.50; alloc.c:879: assertion failed: 0 < item_size && 0 < nitems_incr_min && 0 <= n0 && -1 <= nitems_max Visuwesh
2022-10-01 17:47 ` Eli Zaretskii
2022-10-02  4:30   ` Visuwesh
2022-10-02  6:14     ` Eli Zaretskii
2022-10-02  6:56       ` Visuwesh
2022-10-02  7:02         ` Eli Zaretskii
2022-10-02  8:37           ` Visuwesh
2022-10-02  9:00             ` Eli Zaretskii
2022-10-02  9:17               ` Visuwesh
2022-10-02  9:42                 ` Eli Zaretskii
2022-10-02  9:47                   ` Visuwesh [this message]
2022-10-02  9:58                     ` Eli Zaretskii

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/emacs/

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

  git send-email \
    --in-reply-to=87mtaemu9j.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=58232@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 public inbox

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

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).