[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xnrealloc: How and when to properly use it.
From: |
Keith David Bershatsky |
Subject: |
Re: xnrealloc: How and when to properly use it. |
Date: |
Sat, 27 Apr 2019 21:50:17 -0700 |
Thank you, Paul, for reviewing and responding to this particular thread.
Based upon your suggestion, I set w->mc_elts.caches = xnrealloc ... and have
thus far been unable to crash Emacs -- i.e., your suggestion appears to have
resolved the issue. I'll do some additional testing tomorrow and report back.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> Date: [04-27-2019 18:51:51] <27 Apr 2019 18:51:51 -0700>
> From: Paul Eggert <address@hidden>
> To: Keith David Bershatsky <address@hidden>
> Cc: Emacs Devel <address@hidden>
> Subject: Re: xnrealloc: How and when to properly use it.
>
> Keith David Bershatsky wrote:
> > On a W32 build of Emacs (built with MinGW_32 and ezwinports downloaded a
> > few years ago), my usage of xnrealloc (more often than not) causes Emacs to
> > crash when_not_ running under gdb.
>
> Try the GDB command 'set disable-randomization off'. Of course this makes
> debugging more ... interesting.
>
> + /* Decrease the size of the array to a bare minimum. */
> + xnrealloc (w->mc_elts.caches, 1, sizeof *w->mc_elts.caches);
>
> That can't be right; at the very least you need to assign the returned value
> of xnrealloc back to w->mc_elts.caches.
- Re: xnrealloc: How and when to properly use it.,
Keith David Bershatsky <=