all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Braun Gábor" <braungb88@gmail.com>
Cc: 70122@debbugs.gnu.org
Subject: bug#70122: 29.3.50; transpose-regions can crash Emacs
Date: Mon, 01 Apr 2024 14:55:21 +0300	[thread overview]
Message-ID: <86wmph9u1i.fsf@gnu.org> (raw)
In-Reply-To: <2318820.ElGaqSPkdT@gabor> (message from Braun Gábor on Mon, 01 Apr 2024 12:02:35 +0200)

> From: Braun Gábor <braungb88@gmail.com>
> Date: Mon, 01 Apr 2024 12:02:35 +0200
> 
> I have the following file:
> 
> File ~/.emacs.d/trans-regions-bug.el:
> 
> (with-temp-buffer
>   (insert (propertize "a" 'face 'font-lock-variable-name-face))
>   (insert ":\n")
>   (insert (propertize "b" 'face 'font-lock-variable-name-face))
>   (insert ": \x2113\x2080\n")
>   (insert (propertize "v" 'face 'font-lock-variable-name-face))
>   (insert ": scaling\n")
>   ;; Move last line to the beginning
>   (transpose-regions 1 1 10 21))
> 
> End of file ~/.emacs.d/trans-regions-bug.el:
> 
> 
> After building Emacs as described in the INSTALL file, the following
> command crashes Emacs:
> 
>   src/emacs -Q --batch -l ~/.emacs.d/trans-regions-bug.el
> 
> The following appears:
> 
> Fatal error 11: Segmentation fault
> 
> 
> See below for debugging information.
> 
> Please find attached a patch to transpose-regions
> with added tests.  (The patch intends to fix typos:
> makes sure lengths in bytes and characters are not confused.

Thanks, but could you please show the minimal change required to fix
just the particular problem with this scenario (and perhaps explain
the reason for the crash in words), without any cleanup and
typo/confusion fixes?  That would make it easier to review the patch,
whereas with what you sent, it is hard to understand what exactly is
being fixed.

> One case (likely for optimization only) has been removed,
> seemed too much trouble to get it right.)

If you explain the reason for the crash, perhaps we could leave the
optimization alone.





  reply	other threads:[~2024-04-01 11:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 10:02 bug#70122: 29.3.50; transpose-regions can crash Emacs Braun Gábor
2024-04-01 11:55 ` Eli Zaretskii [this message]
2024-04-01 13:17   ` Eli Zaretskii
2024-04-03 18:52     ` Braun Gábor
2024-04-04  4:48       ` Eli Zaretskii
2024-04-12  9:39         ` Braun Gábor
2024-04-12  9:42           ` Braun Gábor
2024-04-13 10:34           ` Eli Zaretskii
2024-04-16 14:26             ` Braun Gábor
2024-04-20  7:50               ` Eli Zaretskii
2024-04-24 12:35                 ` Braun Gábor

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=86wmph9u1i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70122@debbugs.gnu.org \
    --cc=braungb88@gmail.com \
    /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.