protobuf-test is failing with segmentation fault after execution of 
test sonStreamParserTest.ObjectValues.
Please find the log attached for the same.

I have observed that the if the string used in testcase is reduced to 149 
characters the testcase observed passing.

Example: with change:
diff --git a/src/google/protobuf/util/internal/json_stream_parser_test.cc 
b/src/google/protobuf/util/internal/json_stream_parser_test.cc
index 4bb10251e..b8243468a 100644
--- a/src/google/protobuf/util/internal/json_stream_parser_test.cc
+++ b/src/google/protobuf/util/internal/json_stream_parser_test.cc
@@ -410,7 +410,7 @@ TEST_F(JsonStreamParserTest, ArrayComplexValues) {
 // - object containing array, object, value (true, false, null, num, 
string)
 TEST_F(JsonStreamParserTest, ObjectValues) {
   StringPiece str =
-      "{t: true, f: false, n: null, s: 'a string', d: \"another string\", 
pi: "
+      "{t: true, f: false, n: null, s: 'a string', d: \"anoth\", pi: "
       "22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: 
[[]], "
       "o: {'key': true}}";
   for (int i = 0; i <= str.length(); ++i) {
@@ -419,7 +419,7 @@ TEST_F(JsonStreamParserTest, ObjectValues) {
         ->RenderBool("f", false)
         ->RenderNull("n")
         ->RenderString("s", "a string")
-        ->RenderString("d", "another string")
+        ->RenderString("d", "anoth")
         ->RenderUint64("pi", 22)
         ->RenderInt64("ni", -127)
         ->RenderDouble("pd", 45.3)

Any comments to debug on this would be useful and wanted to know the 
importance of this test.
On Tuesday, November 16, 2021 at 2:28:52 AM UTC+5:30 [email protected] 
wrote:

> I don't think we actively test on any big-endian machines, so it wouldn't 
> be surprising if there are a few bugs that come up in that environment. We 
> would welcome any pull requests with bug fixes.
>
> On Mon, Nov 15, 2021 at 8:40 AM [email protected] <[email protected]> 
> wrote:
>
>>
>> Facing issue with test JsonStreamParserTest.ObjectValues on big-endian 
>> system,
>>
>> Any idea on following error:
>> [ RUN      ] JsonStreamParserTest.ObjectValues
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: ><{t: true, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {><t: true, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t><: true, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t:>< true, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t: ><true, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t: t><rue, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t: tr><ue, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t: tru><e, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t: true><, f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> [libprotobuf INFO 
>> google/protobuf/util/internal/json_stream_parser_test.cc:111] Testing 
>> split: {t: true,>< f: false, n: null, s: 'a string', d: "another string", 
>> pi: 22, ni: -127, pd: 45.3, nd: -1056.4, pl: 11779497823553162765, l: [[]], 
>> o: {'key': true}}
>> ...
>>
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/protobuf/547a1ae9-8eab-4101-9c80-f4c3cef9dbcfn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/protobuf/547a1ae9-8eab-4101-9c80-f4c3cef9dbcfn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/f0ac1069-b404-40c0-8d98-8941b90586b7n%40googlegroups.com.

Reply via email to