Thanks for the update. I appreciate the info. On Tuesday, May 19, 2015 at 5:01:07 PM UTC-5, Feng Xiao wrote: > > > > On Tue, May 19, 2015 at 11:35 AM, Jim Muchow <[email protected] > <javascript:>> wrote: > >> I sent a question yesterday, but I don't see it as having been posted, >> much less >> responded to. My apologies for the redundancy if my original message is >> in some >> queue somewhere. >> >> ********** >> >> I'm trying to determine the utility of Valgrind in an app. The app uses >> protocol buffers. >> >> I am seeing a message from Valgrind >> >> Syscall param write(buf) points to uninitialised byte(s) >> >> with the following info >> >> Address 0x11c7fa02 is 2 bytes inside a block of size 8,192 alloc'd >> >> At first, I thought it might be one of the fields in a message declared >> optional, but >> when I filled out the field, I got the same warning. In the process of >> looking into this >> more closely I was able to dump the buffer: >> >> 0x00 0x01 0xc1 0x09 0x00 0x00 0x00 0x10 <---- >> secret, pre-header? >> 0x08 0x00 0x10 0xa5 0xcb 0x96 0xad 0x0a >> 0x1a 0x06 0x61 0x70 0x61 0x63 0x68 0x65 >> >> The latter 16 bytes are the message proper with three fields and I >> understand how >> they are created and interpreted from the Encoding spec (very helpful). >> It is the first >> eight bytes I don't understand. >> >> These first bytes are almost like a secret pre-header. It looks to me as >> if the last four >> bytes are a 32-bit length field. The number matches in this case and in >> the other case in >> which the optional field was left unset. I can't figure what the first >> four bytes indicate. In >> particular, the bytes 0xc1 and 0x09, which would start the area of the >> supposedly >> uninitialized bytes. >> >> Is there somewhere in the code I can look to see how this pre-header is >> created. Or I >> would be happy to research this myself if some documentation exists, but >> I don't know >> where to start looking. >> > Protobuf does not have such thing as pre-headers. A message is just > serialized as <field tag, field value> pairs without any additional > information (nothing about message name, protobuf version, etc.). The > header you see might be generated by the app rather than protobuf. > > >> >> Thanks for any help, >> jdm >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Protocol Buffers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/protobuf. >> For more options, visit https://groups.google.com/d/optout. >> > >
-- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
