This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/18177] New: possible typo in an "and"-"shift-right" operation with ARCH_LA_PLTEXIT
- From: "je.nunez at yahoo dot ca" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 30 Mar 2015 03:46:19 +0000
- Subject: [Bug dynamic-link/18177] New: possible typo in an "and"-"shift-right" operation with ARCH_LA_PLTEXIT
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18177
Bug ID: 18177
Summary: possible typo in an "and"-"shift-right" operation with
ARCH_LA_PLTEXIT
Product: glibc
Version: 2.21
Status: NEW
Severity: minor
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: je.nunez at yahoo dot ca
Hello,
Sorry for the question, but in "elf/dl-runtime.c" we have a doubt between
the shift-left operation in line 385 and the shift-right one in line 469.
Only line 469 is the one which uses shift-right in these contexts:
380 struct audit_ifaces *afct = GLRO(dl_audit);
381 for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
382 {
383 if (afct->ARCH_LA_PLTENTER != NULL
384 && (reloc_result->enterexit
***385 & (LA_SYMB_NOPLTENTER << (2 * (cnt + 1)))) == 0)
386 {
........
464 struct audit_ifaces *afct = GLRO(dl_audit);
465 for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
466 {
467 if (afct->ARCH_LA_PLTEXIT != NULL
468 && (reloc_result->enterexit
***469 & (LA_SYMB_NOPLTEXIT >> (2 * cnt))) == 0)
470 {
Before that in elf/dl-runtime.c, there are also shift-left operations:
322 /* Remember the results for every audit library
and
323 store a summary in the first two bits. */
324 reloc_result->enterexit
325 &= flags & (LA_SYMB_NOPLTENTER |
LA_SYMB_NOPLTEXIT);
326 reloc_result->enterexit
327 |= ((flags & (LA_SYMB_NOPLTENTER |
LA_SYMB_NOPLTEXIT))
***328 << ((cnt + 1) * 2));
329 }
330 else
331 /* If the bind flags say this auditor is not
interested,
332 set the bits manually. */
333 reloc_result->enterexit
334 |= ((LA_SYMB_NOPLTENTER | LA_SYMB_NOPLTEXIT)
***335 << ((cnt + 1) * 2));
Should line 469 be a shift-left operation ?
Thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.