Well, I have been using this ARM cross compiled protobuf for over a year 
with no problems.  But just today I tried using the ARM compiled protoc to 
compile a test file on the target device...I get the same " munmap_chunk()" 
error!  I normally do the proto compile using the host protoc, and it seems 
to be fine.  All my protobuf stuff is 3.6.1.  My cross compile was pretty 
simple:

./autogen.sh                  
./configure --prefix=/usr/local/protobuf-3.6.1-arm 
--host=arm-linux-gnueabihf
make
make install

And I copy the installed folder to my target board (beaglebone) and 
protobuf works just fine.  I can serialize/deserialize with no problems.  I 
am using 4.9.3 of the linaro toolchain to do the build.  Why would my 
xcompiled protoc compiler fail to compile a simple test on the target 
device with this "munmap_chunk" error?

Thanks!


On Monday, January 11, 2021 at 11:11:55 AM UTC-6 Terry Fryar wrote:

> Using 3.6.1 on an ARM platform.  Trying this sample code:
>
> PROTO
> syntax = "proto3";
> package Test;
> message MyTest {
>     int32 f1 = 1;
>     string f2 = 2;
>     bool f3 = 3;
> }
>
> C++
> Test::MyTest mt;
> mt.set_f1(1234);
> mt.set_f2("hello");
> mt.set_f3(true);
> string s;
> google::protobuf::util::JsonOptions opts;
> google::protobuf::util::MessageToJsonString(mt,&s,opts);
>
> and I get this crash on the MessageToJsonString function call:
>
> *** Error in `./MyApp': munmap_chunk(): invalid pointer: 0xb6fb1214 ***
> Aborted
>
> All the serialization functions work fine.  Why am I getting this error?  
> Thanks!
>
>

-- 
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/b6084ac2-91b2-4fbb-a4ca-6a476a9aac8dn%40googlegroups.com.

Reply via email to