From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c
Date: Mon, 26 Aug 2019 11:50:23 -0700 [thread overview]
Message-ID: <0d879611-8569-0876-bbbb-e706d13d669e@cs.ucla.edu> (raw)
In-Reply-To: <83o90cfecf.fsf@gnu.org>
Eli Zaretskii wrote:
> It's not about us, it's about GCC's tendency to turn more and more
> warnings on by default.
GCC does not enable this particular warning by default, and it's not likely ever
to do so given the high rate of false alarms. People run into warnings like this
because Emacs 'configure' enables them, and Emacs 'configure' is our
responsibility.
> I call GCC_LINT "tinkering".
Developers and builders should not need to tinker in the typical case, if the
default settings are OK. And developers using unusual tools will likely need to
specify special arguments to 'configure' or 'make' anyway, so that's OK.
> What debugging tools can make a significant difference here, and how
> easy/practical is it to use them? I very much doubt they will catch
> every use-before-set bug anyway.
Valgrind is one. There are also proprietary tools such as Coverity, QA-C, and
Oracle Studio. Although they don't catch every use-before-set bug, they catch
enough to be useful and they are practical to use. Admittedly they might not be
*trivial* to use, but they aren't that hard and they don't (or at least
shouldn't) require changing the Emacs source code.
Valgrind works with Emacs master as-is, if you configure Valgrind and Emacs
correctly and avoid having Emacs call library functions that rely on undefined
behavior (Gtk has some, unfortunately, so I typically use -nw when using
Valgrind to debug Emacs). I have used Valgrind to find and fix
uninitialized-memory bugs in Emacs that would have been very difficult to find
simply by using GDB or by staring at the code. As far as I know Valgrind is the
best free tool for debugging some types of low-level errors that GCC does not
diagnose, and this includes some significant classes of use-before-set bugs.
next prev parent reply other threads:[~2019-08-26 18:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-24 6:14 [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c Eli Zaretskii
2019-08-25 0:52 ` Paul Eggert
2019-08-25 7:13 ` Eli Zaretskii
2019-08-26 6:34 ` Paul Eggert
2019-08-26 7:54 ` Eli Zaretskii
2019-08-26 8:15 ` Paul Eggert
2019-08-26 9:47 ` Eli Zaretskii
2019-08-26 15:21 ` Óscar Fuentes
2019-08-26 16:13 ` Eli Zaretskii
2019-08-26 18:20 ` Óscar Fuentes
2019-08-26 18:39 ` Eli Zaretskii
2019-08-26 19:09 ` Paul Eggert
2019-08-26 19:15 ` Óscar Fuentes
2019-08-26 19:33 ` Eli Zaretskii
2019-08-26 19:49 ` Óscar Fuentes
2019-08-26 22:33 ` Paul Eggert
2019-08-27 6:12 ` Eli Zaretskii
2019-08-27 7:28 ` Paul Eggert
2019-08-27 8:02 ` Eli Zaretskii
2019-08-27 9:28 ` Paul Eggert
2019-08-27 10:15 ` Eli Zaretskii
2019-08-27 12:05 ` Paul Eggert
2019-08-27 12:43 ` Eli Zaretskii
2019-08-26 18:50 ` Paul Eggert [this message]
2019-08-26 18:56 ` Eli Zaretskii
2019-08-26 23:17 ` Richard Stallman
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=0d879611-8569-0876-bbbb-e706d13d669e@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--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 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.