[protobuf] Re: Issue 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #9 on issue 289 by m...@bakedbeans.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 I've applied the patch in r402, done a full clean rebuilds of both release and debug, but these unit tests still fail in both cases. Strangely both fail a different number of tests. I've attached both test outputs. Attachments: debug.txt 113 KB release.txt 103 KB -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #11 on issue 289 by liuj...@google.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 Wait, did you define PROTOBUF_USE_EXCEPTIONS? That seemed to be the reasons of these error. -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #12 on issue 289 by m...@bakedbeans.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 No, I haven't defined PROTOBUF_USE_EXCEPTIONS anywhere. I tried using gtest 1.5, now all tests pass in release and debug modes. -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #13 on issue 289 by liuj...@google.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 A Node for myself: The reason that gtest 1.6 didn't pass, because this diff http://code.google.com/p/googletest/source/diff?spec=svn500r=500format=sidepath=/trunk/include/gtest/internal/gtest-death-test-internal.hold_path=/trunk/include/gtest/internal/gtest-death-test-internal.hold=482 In 2.4.0 release, protobuf GOOGLE_CHECK will throw an exception(FatalException derived from std::exception) by default instead of exit(0) which isn't compatible with gtest 1.6 death check. -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #14 on issue 289 by m...@bakedbeans.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 Thanks for resolving this issue! -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #2 on issue 289 by liuj...@google.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 Hi Mark, Could you please provide some details about how you build the x64 version, e.g. how you changed compiling options after importing the default vs project files. I cannot reproduce the error locally. Thanks, Pherl -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #3 on issue 289 by m...@bakedbeans.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 Hi Pherl, below are the steps I had to go through to get it to build. * Rename gtest directort to gtest.orig * Download gtest 1.6.0 * Extract to replace original gtest directory * Open gtest.sln in VS2010 to convert the projects then close MSVC * Open protobuf.sln in VS2010 * Follow conversion process as usual * Select menu Build-Configuration Manager * Select 'Active solution platform' dropdown and choose New... * Choose x64 as platform and copy settings from Win32, make sure create new project platforms is selected * Close configuration manager * Make sure that x64 platform is selected * Confirm that all projects are using the same C/C++ runtime library * Build the projects * Run tests.exe -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #5 on issue 289 by m...@bakedbeans.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 I've attached the files as requested. Attachments: unittest.pb.h 439 KB unittest.pb.cc 704 KB -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #6 on issue 289 by liuj...@google.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 OK, so probably a bug of vc2010 x64 platform... The function in question is: // in strutil.cc char *InternalFastHexToBuffer(uint64 value, char* buffer, int num_byte) { static const char *hexdigits = 0123456789abcdef; buffer[num_byte] = '\0'; for (int i = num_byte - 1; i = 0; i--) { buffer[i] = hexdigits[uint32(value) 0xf]; value = 4; } return buffer; } More specifically, this line: hexdigits[uint32(value) 0xf]; In release mode, due to unknown optimization, the ultimate value in the loop will be replaced by the penultimate value... That said: 0x010 will be 0x1100. A simple fix is to remove the uint32() copy constructor: hexdigits[value 0xf]; I don't know why the copy constructor was there though... -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #7 on issue 289 by m...@bakedbeans.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 I get this in debug mode also. -- 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 289 in protobuf: 64 bit release build unit tests fail in MSVC 2010
Comment #8 on issue 289 by liuj...@google.com: 64 bit release build unit tests fail in MSVC 2010 http://code.google.com/p/protobuf/issues/detail?id=289 VC seemed to cache the protoc generated files even if you switch Debug/Release. That's why I couldn't reproduce the error - the debug build was fine. BTW, the files you uploaded were probably generated in debug mode also, as they were correct. 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.