[SR-Dev] Config framework error for tm module
andrei at iptel.org
Fri May 22 13:15:53 CEST 2009
On May 21, 2009 at 18:20, Miklos Tirpak <miklos at iptel.org> wrote:
> this is strange because the cfg framework says that the offset between
> cfg_group_tm.tm_auto_inv_100_r and cfg_group_tm.tm_unix_tx_timeout is 4,
> but I think sizeof(char *) should be 8 on 64bits, so the offset should
> be at least 8. (cfg.c:81)
Yes, it should be 8.
> Andrei, do you have any hint?
I've looked at it on a 64 bits system and I found a problem: the sanity
check compares the computed size directly with sizeof(struct). However
the structure will be padded if its size is not a multiple of the size
of the type of its member requiring the highest alignment.
In our case the extra char* member on 64 bits caused a 4 bytes padding
and the sanity check failed.
I've already commited the fix to the repository.
Nils gbd output looks very strange, but hopefully we won't need to
More information about the sr-dev