This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v2 4/4] Add documentation about gengtype and inheritance
- From: Jeff Law <law at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Oct 2013 23:39:51 -0600
- Subject: Re: [PATCH v2 4/4] Add documentation about gengtype and inheritance
- Authentication-results: sourceware.org; auth=none
- References: <1379685919-9437-1-git-send-email-dmalcolm at redhat dot com> <1380044971-11810-1-git-send-email-dmalcolm at redhat dot com> <1380044971-11810-5-git-send-email-dmalcolm at redhat dot com> <525D8E45 dot 1080109 at redhat dot com> <1382583621 dot 2675 dot 41 dot camel at surprise>
On 10/23/13 21:00, David Malcolm wrote:
I went through the various requirements listed in the doc and
investigated what happens when they're violated. Some lead to immediate
build failure in gengtype (which is relatively sane), but some lead to
silent lack of field-traversal. The details:
Yea, build failure in gengtype is reasonable. Build failure because
gengtype generated bogons, is slightly less desirable, but still in the
realm of OK IMHO. Silent lack of field traversal is bad bad bad.
Summarizing:
(B), (F), (G): silent possibility of failing to visit fields during
traversal (bad, bad, bad)
These are obviously the most worrisome.
(A), (C), (D), (E): build-time failures (relatively benign by
comparison)
As for this patch, it is OK once the prerequisites go in.
AIUI you've approved each patch in the whole series, and so far I've
committed patches 1 and 2 of the 4 (relatively safe).
Clearly I should add some robustness to better handle the more egregious
failure modes described above. Should I post patches to do so before
committing further, or can I commit the rest of the approved patches in
the "v2" series (patches 3 and 4), doing the hardening patches as a
followup?
Your call as long as you commit to do what you can to harden this code.
As an aside, has anyone tried writing a testsuite for gengtype and the
GTY machinery?
Not that I'm aware of.
jeff