View Issue Details

IDProjectCategoryView StatusLast Update
0003043GNUnettestbed servicepublic2013-12-24 19:54
ReporterFlorian Dold Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.10.0Fixed in Version0.10.0 
Summary0003043: misaligned struct GNUNET_TESTBED_PeerConfigurationInformationMessage
DescriptionThe following structure
struct GNUNET_TESTBED_PeerConfigurationInformationMessage {
  struct GNUNET_MessageHeader header;
  uint32_t peer_id GNUNET_PACKED;
  uint64_t operation_id GNUNET_PACKED;
  struct GNUNET_PeerIdentity peer_identity;
  uint16_t config_size GNUNET_PACKED;
  /* rest: compressed config data */
};

should have size of 4 + 4 + 8 + 64 + 2 = 82, but according to GDB:
  (gdb) print sizeof(struct GNUNET_TESTBED_PeerConfigurationInformationMessage)
  $1 = 84

The structure is clearly misaligned, *but* I still don't understand while the GNUNET_PACKED / GNUNET_NETWORK_STRUCT_* macros don't work here!

While the above problem does not really matter anywhere in the C code, when defining the same struct in gnunet-java, which does not do any automatic alignment, the configuration data begins one byte later than expected.
TagsNo tags attached.

Activities

Christian Grothoff

2013-09-25 18:42

manager   ~0007473

Fixed earlier today by adding GNUNET_PACKED to peer struct.

Issue History

Date ModifiedUsernameFieldChange
2013-09-25 10:21Florian DoldNew Issue
2013-09-25 10:21Florian DoldStatusnew => assigned
2013-09-25 10:21Florian DoldAssigned To => Sree Harsha Totakura
2013-09-25 18:42Christian GrothoffNote Added: 0007473
2013-09-25 18:42Christian GrothoffStatusassigned => resolved
2013-09-25 18:42Christian GrothoffFixed in Version => 0.10.0
2013-09-25 18:42Christian GrothoffResolutionopen => fixed
2013-09-25 18:43Christian GrothoffAssigned ToSree Harsha Totakura => Christian Grothoff
2013-09-25 18:43Christian GrothoffProduct Version => Git master
2013-09-25 18:43Christian GrothoffTarget Version => 0.10.0
2013-12-24 19:54Christian GrothoffStatusresolved => closed