public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/66887] New: trunk/libmpx/mpxrt/mpxrt.c:158: possible performance problem
@ 2015-07-15 18:24 dcb314 at hotmail dot com
  2015-09-24  8:53 ` [Bug other/66887] " dcb314 at hotmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2015-07-15 18:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66887

            Bug ID: 66887
           Summary: trunk/libmpx/mpxrt/mpxrt.c:158: possible performance
                    problem
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

[trunk/libmpx/mpxrt/mpxrt.c:159]: (performance) Buffer 'buffer' is being
written before its old content has been used.

Source code is

  memset (buffer, 0, sizeof (buffer));
  memcpy (buffer,
      (uint8_t *)uctxt->uc_mcontext.fpregs + XSAVE_OFFSET_IN_FPMEM,
      sizeof (struct xsave_struct));

Maybe something like

  memcpy (buffer,
      (uint8_t *)uctxt->uc_mcontext.fpregs + XSAVE_OFFSET_IN_FPMEM,
      sizeof (struct xsave_struct));

  memset (&buffer[sizeof (struct xsave_struct))], 0, sizeof (buffer) - sizeof
(struct xsave_struct)) );


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-15  9:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-15 18:24 [Bug other/66887] New: trunk/libmpx/mpxrt/mpxrt.c:158: possible performance problem dcb314 at hotmail dot com
2015-09-24  8:53 ` [Bug other/66887] " dcb314 at hotmail dot com
2015-09-24 10:02 ` ienkovich at gcc dot gnu.org
2015-10-15  9:27 ` ienkovich at gcc dot gnu.org
2015-10-15  9:30 ` ienkovich at gcc dot gnu.org

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).