[protobuf] Re: Secret Message Pre-Header

2015-05-21 Thread Mason Cubes
The first  8 bytes is some kind of header. 

the next two bytes are varint tag with field number 1 and interger  value = 
0
next 6 bytes is also varint tag with field number 2 and value = {five byes}
next 2 bytes says it is a string or byte array with with 6 bytes long. :)




On Tuesday, May 19, 2015 at 11:54:01 PM UTC+2, Jim Muchow 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:

 0x000x010xc10x090x000x000x000x10  secret, 
 pre-header?
 0x080x000x100xa50xcb0x960xad0x0a
 0x1a0x060x610x700x610x630x680x65

 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.

 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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Secret Message Pre-Header

2015-05-21 Thread Mason Cubes
follow up to my previous post...  the first four byte is out of my 
imagination, but the next 4 bytes indicates 16 that should be the following 
message size. 


On Tuesday, May 19, 2015 at 11:54:01 PM UTC+2, Jim Muchow 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:

 0x000x010xc10x090x000x000x000x10  secret, 
 pre-header?
 0x080x000x100xa50xcb0x960xad0x0a
 0x1a0x060x610x700x610x630x680x65

 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.

 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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.