Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: regression in multi-threaded git-pack-index

From: Jeff King <hidden>
Date: 2016-06-15 22:56:26

On Tue, Mar 19, 2013 at 11:45:56AM +0100, Thomas Rast wrote:
Now consider

  // somewhere on the stack
  struct foo {
    char c;
    int i;
  } a, b;
  a.c = a.i = 0;

  memcpy(&b, &a, sizeof(struct foo));

The compiler could legitimately leave the padding between c and i
uninitialized, and with your proposed "early" reporting the memcpy would
complain.
Ah, good point. And valgrind does not have any way of knowing what is
padding and what is not, since it sees only the compiled contents.
Probably llvm's memory checker support could do a better job there.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help