[protobuf] Re: Issue 313 in protobuf: in c++ generated header, has_FIELD will return random results if more than 32 optional fields defined in single message
Updates: Status: Invalid Comment #3 on issue 313 by xiaof...@google.com: in c++ generated header, has_FIELD will return random results if more than 32 optional fields defined in single message http://code.google.com/p/protobuf/issues/detail?id=313 (No comment was entered for this change.) -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 313 in protobuf: in c++ generated header, has_FIELD will return random results if more than 32 optional fields defined in single message
Comment #2 on issue 313 by agca...@gmail.com: in c++ generated header, has_FIELD will return random results if more than 32 optional fields defined in single message http://code.google.com/p/protobuf/issues/detail?id=313 The problem was that the developer of the library I was using update the .pb.h file but didn't commit the .pb.cc to the repository used to build the library. Please close this issue as invalid. As a side note, could you not detect this at runtime and abort in some way. I am thinking you could add a hash of the .proto file to .pb.cc file and .pb.h file that gets compared via a static class member initialization or some other means. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 313 in protobuf: in c++ generated header, has_FIELD will return random results if more than 32 optional fields defined in single message
Comment #1 on issue 313 by liuj...@google.com: in c++ generated header, has_FIELD will return random results if more than 32 optional fields defined in single message http://code.google.com/p/protobuf/issues/detail?id=313 This should not happen. What platform are you using? Can you write a simple deomo for this issue? Please upload the .proto and generated .pb.h in question. We use an array of int32 for HAS_bit. The actually has_ bit is stored in has_array[ (field_index) / 32]. The mask is 1u << (field_index % 32). BTW, if you use x64 platform in MSVC professional, there was a bug about generating the has bit mask. It's fixed in r402. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.