[protobuf] Clang's MSAN reports issue with statusor_test.cc

2015-08-05 Thread Austin Schuh
I built the protobuf compiler and test suites today with the
MemorySanitizer in Clang, and ran into an issue with uninitialized
variables in protobuf/src/google/protobuf/stubs/statusor_test.cc.

Both StatusOr.TestPointerCopyCtorStatusNotOkConverting
and StatusOr.TestPointerAssignmentStatusNotOkConverting are failing.  It
looks like they are failing because value_ isn't initialized in the first
StatusOr.  When you convert a Derived* to a Base2*, it then triggers the
compiler to modify the pointer and that looks like it triggers the failure.

I don't think this is a real issue, but I'm not sure.  Any advice?

Austin

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


Re: [protobuf] Clang's MSAN reports issue with statusor_test.cc

2015-08-05 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Aug 3, 2015 at 7:00 PM, Austin Schuh aus...@peloton-tech.com
wrote:

 I built the protobuf compiler and test suites today with the
 MemorySanitizer in Clang, and ran into an issue with uninitialized
 variables in protobuf/src/google/protobuf/stubs/statusor_test.cc.

 Both StatusOr.TestPointerCopyCtorStatusNotOkConverting
 and StatusOr.TestPointerAssignmentStatusNotOkConverting are failing.  It
 looks like they are failing because value_ isn't initialized in the first
 StatusOr.  When you convert a Derived* to a Base2*, it then triggers the
 compiler to modify the pointer and that looks like it triggers the failure.

 I don't think this is a real issue, but I'm not sure.  Any advice?

Could you help create an issue for this on our github site:
https://github.com/google/protobuf ?

I also don't think it affects the correctness of the program but fixing it
is straight enough and that's probably what we should do here.



 Austin

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


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


Re: [protobuf] Clang's MSAN reports issue with statusor_test.cc

2015-08-05 Thread Austin Schuh
https://github.com/google/protobuf/issues/693

On Wed, Aug 5, 2015 at 1:29 PM Feng Xiao xiaof...@google.com wrote:

 On Mon, Aug 3, 2015 at 7:00 PM, Austin Schuh aus...@peloton-tech.com
 wrote:

 I built the protobuf compiler and test suites today with the
 MemorySanitizer in Clang, and ran into an issue with uninitialized
 variables in protobuf/src/google/protobuf/stubs/statusor_test.cc.

 Both StatusOr.TestPointerCopyCtorStatusNotOkConverting
 and StatusOr.TestPointerAssignmentStatusNotOkConverting are failing.  It
 looks like they are failing because value_ isn't initialized in the first
 StatusOr.  When you convert a Derived* to a Base2*, it then triggers the
 compiler to modify the pointer and that looks like it triggers the failure.

 I don't think this is a real issue, but I'm not sure.  Any advice?

 Could you help create an issue for this on our github site:
 https://github.com/google/protobuf ?

 I also don't think it affects the correctness of the program but fixing it
 is straight enough and that's probably what we should do here.



 Austin

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



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