> extern KVStr* _init_kv_str(int has_job_id, int job_id,
> int has_num_item, int num_item, int n_name)
> KVStr kv_str = KVSTR__INIT;
> return &kv_str;
In the function you are returning local stack variable (kv_str). By the
time pack accesses the message, it probably overwritten.
Allocate from heap and return.
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 post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.