From: Alex <agrambot@gmail.com>
To: 5847@debbugs.gnu.org
Subject: bug#5847: [Hubert Gosselmeyer] Re: bug#5847: ETAGS: Segmentation fault, because of incorrect scope presumption
Date: Fri, 19 Aug 2016 21:32:25 -0600 [thread overview]
Message-ID: <87inuwf73q.fsf@gmail.com> (raw)
In-Reply-To: <z2u7bf38ca41004060644r8f65f8bdha1ba682ec6e9f112@mail.gmail.com>
[-- Attachment #0: Type: message/rfc822, Size: 927761 bytes --]
[-- Attachment #1.1.1: Type: text/plain, Size: 1043 bytes --]
Hi Alex,
I rechecked the issue with my new hardware (got a new laptop meanwhile).
The issue does not occur for the files attached on the bug report anymore.
As I suspect that it has something to do with large memory allocation, I
produced some larger files
with an python script. I tested it on my machine still with etags (GNU
Emacs 23.1) and gave the files
to a collegue, who tested it with etags (GNU Emacs 24.3). On both etags
crashed for test_seg.c.
On Sun, Aug 14, 2016 at 11:38 PM, Alex <agrambot@gmail.com> wrote:
> Hubert Gosselmeyer <gosselmeyer@googlemail.com> writes:
>
> > Hi,
> >
> > the GNU Emacs TAGS tool 'etags' seems to have problems if source code is
> not
> > probably indented and new scopes are created within procedures. I found
> this
> > out by using etags on generated code where a lot of structures where
> created
> > on the heap, initialized and assigned to an array of pointers.
>
> Hi, do you still encounter this issue? I tried to reproduce with Emacs
> 24.5 but both files did not segfault for me.
>
[-- Attachment #1.1.2: Type: text/html, Size: 1562 bytes --]
[-- Attachment #1.2: test_noseg.c.gz --]
[-- Type: application/x-gzip, Size: 369681 bytes --]
[-- Attachment #1.3: test_seg.c.gz --]
[-- Type: application/x-gzip, Size: 311652 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: segf.py --]
[-- Type: text/x-python; name=segf.py, Size: 699 bytes --]
from subprocess import call
with open('test_seg.c', 'w') as f:
f.write("""
struct test {
long i;
};
struct test* testArr[32000];
long i;
int main(){
i = 0;
)
""")
for i in range(1, 900000):
f.write("""
{
struct test *t = malloc(sizeof(struct test));
i++;
t->i = i;
testArr[i] = t;
free(t);
}
""")
f.write("}")
with open('test_noseg.c', 'w') as f:
f.write("""
struct test {
long i;
};
struct test* testArr[32000];
long i;
int main(){
i = 0;
)
""")
for i in range(1, 900000):
f.write("""
{
struct test *t = malloc(sizeof(struct test));
i++;
t->i = i;
testArr[i] = t;
free(t);
}
""")
f.write("}")
next prev parent reply other threads:[~2016-08-20 3:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 13:44 bug#5847: ETAGS: Segmentation fault, because of incorrect scope presumption Hubert Gosselmeyer
2016-08-14 21:38 ` Alex
2016-08-20 3:32 ` Alex [this message]
2016-08-20 15:55 ` bug#5847: [Hubert Gosselmeyer] " Eli Zaretskii
2016-08-20 16:27 ` Eli Zaretskii
2016-08-31 15:59 ` Eli Zaretskii
2016-08-20 17:57 ` Ivan Shmakov
2016-08-20 18:18 ` Eli Zaretskii
2016-08-20 19:17 ` Ivan Shmakov
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=87inuwf73q.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=5847@debbugs.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).