This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[review v2] Clarify purpose of assert in _dl_lookup_symbol_x
- From: "Florian Weimer (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Cc: "Gabriel F. T. Gomes" <gabriel at inconstante dot net dot br>
- Date: Tue, 12 Nov 2019 07:52:18 -0500
- Subject: [review v2] Clarify purpose of assert in _dl_lookup_symbol_x
- Auto-submitted: auto-generated
- References: <gerrit.1572549639000.I3384349cef90cfd91862ebc34a4053f0c0a99404@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Florian Weimer has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/469
......................................................................
Patch Set 2:
(1 comment)
I've added you to the glibc-maintainers group, so you can give +2 now as well.
(I'm not sure if we can keep up the practice of adding Reviewed-By: lines with Gerrit, because doing so creates a new patch version that needs review.)
| --- elf/dl-lookup.c
| +++ elf/dl-lookup.c
| @@ -793,16 +793,14 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
| bump_num_relocations ();
|
| - /* No other flag than DL_LOOKUP_ADD_DEPENDENCY or DL_LOOKUP_GSCOPE_LOCK
| - is allowed if we look up a versioned symbol. */
| - assert (version == NULL
| - || (flags & ~(DL_LOOKUP_ADD_DEPENDENCY | DL_LOOKUP_GSCOPE_LOCK))
| - == 0);
| + /* DL_LOOKUP_RETURN_NEWEST does not make sense for versioned
| + lookups. */
| + assert (version == NULL || !(flags & DL_LOOKUP_RETURN_NEWEST));
PS1, Line 797:
Indeed. (You can mark comments as not requiring a reply by marking
them as Resolved.)
|
| size_t i = 0;
| if (__glibc_unlikely (skip_map != NULL))
| /* Search the relevant loaded objects for a definition. */
| while ((*scope)->r_list[i] != skip_map)
| ++i;
|
| /* Search the relevant loaded objects for a definition. */
| for (size_t start = i; *scope != NULL; start = 0, ++scope)
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: I3384349cef90cfd91862ebc34a4053f0c0a99404
Gerrit-Change-Number: 469
Gerrit-PatchSet: 2
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
Gerrit-Comment-Date: Tue, 12 Nov 2019 12:52:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
Gerrit-MessageType: comment