this patch and the patch regarding the generic_static stuff is incomplete.
If the generic option is static, the option_static flag must be copied
around with the other fields too.
I do something like this there:
instead of copy each struct element explicit. You prefer memcpy to avoid alignment issues.
Yeah, everything works on a Intel box, but if go to ARM strange things happens...
On a SPARC platform you may receive a SIGBUS, which helps.
But I assume, If there is a alignment problem, then there is a problem using
the "->" operator with this struct at all, not only when coping the whole data.
This option_static problem is the same here:
Hello,
this patch and the patch regarding the generic_static stuff is incomplete.
If the generic option is static, the option_static flag must be copied
around with the other fields too.
I do something like this there:
if(persist- >data.generic. option_ static == 1) >data.generic = persist- >data.generic; decomp_ debug(context, "TCP generic option payload = %u bytes", persist- >data.generic. load_len) ;
{
opt_ctxt-
rohc_
}
instead of copy each struct element explicit. You prefer memcpy to avoid alignment issues.
Yeah, everything works on a Intel box, but if go to ARM strange things happens...
On a SPARC platform you may receive a SIGBUS, which helps.
But I assume, If there is a alignment problem, then there is a problem using
the "->" operator with this struct at all, not only when coping the whole data.
This option_static problem is the same here:
if(discriminator == 0xff) ctxt->data. generic = persist- >data.generic; decomp_ debug(context, "TCP generic option payload = %u bytes", persist- >data.generic. load_len) ;
{
opt_
rohc_
}
If no data received, the ->option_static flag must be copied too.
Or explicit:
I guess, in the case
else if(discriminator == 0x00) ctxt->data. generic. option_ static = 0; ctxt->data. generic. load_len = opt_load_len; opt_ctxt- >data.generic. load, data + read, opt_load_len); decomp_ debug(context, "TCP generic option payload = %zu bytes", opt_load_len);
{
...
opt_
opt_
memcpy(
read += opt_load_len;
rohc_
Best,
Klaus Warnke