View Issue Details

IDProjectCategoryView StatusLast Update
0003043GNUnettestbed servicepublic2013-12-24 20:54
ReporterFlorian Dold Assigned ToChristian Grothoff  
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 20:42

manager   ~0007473

Fixed earlier today by adding GNUNET_PACKED to peer struct.

Issue History

Date Modified Username Field Change
2013-09-25 12:21 Florian Dold New Issue
2013-09-25 12:21 Florian Dold Status new => assigned
2013-09-25 12:21 Florian Dold Assigned To => Sree Harsha Totakura
2013-09-25 20:42 Christian Grothoff Note Added: 0007473
2013-09-25 20:42 Christian Grothoff Status assigned => resolved
2013-09-25 20:42 Christian Grothoff Fixed in Version => 0.10.0
2013-09-25 20:42 Christian Grothoff Resolution open => fixed
2013-09-25 20:43 Christian Grothoff Assigned To Sree Harsha Totakura => Christian Grothoff
2013-09-25 20:43 Christian Grothoff Product Version => Git master
2013-09-25 20:43 Christian Grothoff Target Version => 0.10.0
2013-12-24 20:54 Christian Grothoff Status resolved => closed