From: Greg Minshall <minshall@acm.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: make check fails? (emacs-26.1 w/modules)
Date: Tue, 04 Sep 2018 13:39:54 +0300 [thread overview]
Message-ID: <12105.1536057594@minshall-apollo.minshall.org> (raw)
In-Reply-To: Your message of "Mon, 03 Sep 2018 18:13:06 +0300." <83efeazkal.fsf@gnu.org>
um, err. you know how it is. you're gdb'ing through ./src, setting
breakpoints, examining data, getting a sense of the control flow,
generally having a grand old time.
but, it's hard, and getting annoying, trying to see, navigate, through
the optimizer. so, you change src/Makefile's CFLAGS to remove the -O2,
touch the file you're currently looking at -- which just happened to be
src/emacs-module.c -- recompile, start up gdb again, and
----
make[3]: Leaving directory '/home/minshall/src/import/emacs/git/emacs/test'
SUMMARY OF TEST RESULTS
-----------------------
Files examined: 186
Ran 2601 tests, 2582 results as expected, 19 skipped
make[2]: Leaving directory '/home/minshall/src/import/emacs/git/emacs/test'
make[1]: Leaving directory '/home/minshall/src/import/emacs/git/emacs/test'
----
so, the optimizer. i turned back on -O2, recompiled emacs-module.c, and
asked gdb to kindly disassemble module_intern() for me (as that function
was on the path i was ascending):
----
(gdb) disassemble module_intern
Dump of assembler code for function module_intern:
0x0000000000592370 <+0>: push %rbx
0x0000000000592371 <+1>: mov %rdi,%rbx
0x0000000000592374 <+4>: callq 0x592180 <module_assert_thread>
0x0000000000592379 <+9>: cmpb $0x0,0x66ae08(%rip) # 0xbfd188 <module_assertions>
0x0000000000592380 <+16>: je 0x59238a <module_intern+26>
0x0000000000592382 <+18>: mov %rbx,%rdi
0x0000000000592385 <+21>: callq 0x592240 <module_assert_env>
0x000000000059238a <+26>: mov %rbx,%rdi
0x000000000059238d <+29>: callq 0x592340 <module_non_local_exit_check>
0x0000000000592392 <+34>: xor %eax,%eax
0x0000000000592394 <+36>: pop %rbx
0x0000000000592395 <+37>: retq
End of assembler dump.
----
well, *that's* definitely optimized.
here's my compiler:
----
bash minshall-apollo: {1294} gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----
admittedly pretty old, but that's apparently what ubuntu's serving up
these days.
i guess it's always possible the optimizer is doing the right thing
because of some programming error, maybe a mis-placed "const" on an
extern, something like that.
cheers, Greg
next prev parent reply other threads:[~2018-09-04 10:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 14:39 make check fails? (emacs-26.1 w/modules) Greg Minshall
2018-09-03 15:12 ` Greg Minshall
2018-09-03 15:13 ` Eli Zaretskii
2018-09-03 15:16 ` Greg Minshall
2018-09-03 15:18 ` Greg Minshall
2018-09-04 10:39 ` Greg Minshall [this message]
2018-09-05 7:54 ` Paul Eggert
2018-09-05 9:14 ` Greg Minshall
2018-09-05 20:26 ` Greg Minshall
2018-09-05 20:55 ` Paul Eggert
2018-09-06 8:58 ` Robert Pluim
2018-09-06 10:32 ` Greg Minshall
2018-09-12 13:41 ` Robert Pluim
2018-09-12 14:56 ` Paul Eggert
2018-09-12 16:19 ` Greg Minshall
2018-09-12 16:37 ` Robert Pluim
2018-09-12 16:27 ` Greg Minshall
2018-09-12 16:39 ` Robert Pluim
2018-09-07 9:10 ` Greg Minshall
2018-09-03 18:27 ` Paul Eggert
2018-09-03 23:46 ` Greg Minshall
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=12105.1536057594@minshall-apollo.minshall.org \
--to=minshall@acm.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@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).