From: Ian Lance Taylor <iant@google.com>
To: binutils@sourceware.org
Subject: gold patch committed: Check that options are valid before using them
Date: Thu, 19 Mar 2009 19:04:00 -0000 [thread overview]
Message-ID: <m31vstfi6r.fsf@google.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
In my recent patch to set the close-on-exec flags for descriptors, I
forgot to check that the options are valid before checking whether there
are any plugins. I committed this patch to fix that oversight.
Ian
2009-03-19 Ian Lance Taylor <iant@google.com>
* descriptors.cc (Descriptors::open): Check that the options are
valid before using them.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Check that options are valid before using them --]
[-- Type: text/x-patch, Size: 764 bytes --]
Index: descriptors.cc
===================================================================
RCS file: /cvs/src/src/gold/descriptors.cc,v
retrieving revision 1.5
diff -u -u -p -r1.5 descriptors.cc
--- descriptors.cc 17 Mar 2009 17:09:44 -0000 1.5
+++ descriptors.cc 19 Mar 2009 19:02:33 -0000
@@ -130,7 +130,9 @@ Descriptors::open(int descriptor, const
// header file but not supported by the kernel.
// Unfortunately there doesn't seem to be any obvious way to
// detect that, as unknown flags passed to open are ignored.
- if (O_CLOEXEC == 0 && parameters->options().has_plugins())
+ if (O_CLOEXEC == 0
+ && parameters->options_valid()
+ && parameters->options().has_plugins())
fcntl(new_descriptor, F_SETFD, FD_CLOEXEC);
{
reply other threads:[~2009-03-19 19:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m31vstfi6r.fsf@google.com \
--to=iant@google.com \
--cc=binutils@sourceware.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.
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).