GNU bug report logs - #45122
[PATCH] 27.1; 28.0.50; Fix crash (segfault) in etags on generating tags for Erlang files

Previous Next

Package: emacs;

Reported by: "serge.tupchii" <serge.tupchii <at> protonmail.com>

Date: Tue, 8 Dec 2020 16:18:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45122 in the body.
You can then email your comments to 45122 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#45122; Package emacs. (Tue, 08 Dec 2020 16:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "serge.tupchii" <serge.tupchii <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Dec 2020 16:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "serge.tupchii" <serge.tupchii <at> protonmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: [PATCH] 27.1; 28.0.50;
 Fix crash (segfault) in etags on generating  tags for Erlang files
Date: Tue, 08 Dec 2020 11:34:25 +0000
[Message part 1 (text/plain, inline)]
Hi,

This is a trivial patch to fix segfault occurring when generating tags for Erlang source files.


Steps to reproduce:

 1. $ wget https://erlang.org/download/otp_src_23.1.tar.gz  (~85 Mb)
 2. $ tar -xf otp_src_23.1.tar.gz
 3. $ etags otp_src_23.1/lib/*/src/*.erl
   Segmentation fault (core dumped)

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9, cairo version 1.14.6)
 of 2020-11-30 built on sergey-Latitude-5480
Repository revision: 31dcc70e555482fee59df2d8aa1939360d8f8c69
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 16.04.7 LTS

Note: this bug is also present in Emacs 27 release

GDB backtrace:
(gdb) bt
#0  0x00007ffff7b5b48d in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x000000000040a7bd in mempcpy (__len=12, __src=<optimized out>, __dest=0x0)
    at /usr/include/x86_64-linux-gnu/bits/string3.h:67
#2  memcpyz (len=<optimized out>, src=<optimized out>, dest=0x0) at etags.c:149
#3  Erlang_functions (inf=0x6280a0) at etags.c:6082
#4  0x000000000040c003 in find_entries (inf=inf <at> entry=0x6280a0) at etags.c:1901
#5  0x000000000040c75e in process_file (fh=fh <at> entry=0x6280a0,
    fn=fn <at> entry=0x7fffffff644c "otp_src_23.1/lib/asn1/src/asn1ct_check.erl", lang=lang <at> entry=0x0)
    at etags.c:1722
#6  0x000000000040c9e0 in process_file_name (
    file=0x7fffffff644c "otp_src_23.1/lib/asn1/src/asn1ct_check.erl", lang=0x0) at etags.c:1668
#7  0x0000000000401c0c in main (argc=<optimized out>, argv=<optimized out>) at etags.c:1313


The attached patch fixes the above issue.

Thanks and kind regards,
Serge
[0001-Fix-crash-segfault-in-etags-on-generating-tags-for-E.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45122; Package emacs. (Tue, 08 Dec 2020 20:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 45122 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "serge.tupchii" <serge.tupchii <at> protonmail.com>
Cc: 45122 <at> debbugs.gnu.org
Subject: Re: bug#45122: [PATCH] 27.1; 28.0.50; Fix crash (segfault) in etags
 on generating  tags for Erlang files
Date: Tue, 08 Dec 2020 21:22:51 +0100
"serge.tupchii" <serge.tupchii <at> protonmail.com> writes:

> This is a trivial patch to fix segfault occurring when generating tags
> for Erlang source files.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 08 Dec 2020 20:24:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 45122 <at> debbugs.gnu.org and "serge.tupchii" <serge.tupchii <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 08 Dec 2020 20:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Jan 2021 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.