Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#25 closed defect (wontfix) might fail on 64-bit platforms

Reported by: flip Owned by: flip
Priority: major Milestone:
Component: general/unknown Version:
Keywords: Cc:

Description (last modified by flip) relies on struct which in turn relies on C's sizeof() to decide how big certain types are. In our world, floats are always 4 bytes, and so if Python's struct module ever decides that floats are 8 bytes (as seems likely under 64 bit), then our code that uses struct will break.

Currently only the function _decode_raw() is affected.

Change History (3)

comment:1 Changed 11 years ago by flip

Easy fix -- add an initial character to the format string which forces use of 4-byte floats. See the doc for the struct module.

comment:2 Changed 9 years ago by flip

  • Description modified (diff)
  • Resolution set to wontfix
  • Status changed from new to closed was moved to common/util/ in early August 2011.

I'm closing this as WONTFIX because we have no idea if raw data was written on a 32- or 64- bit platform.

Note that this only affects data that is not XDRed.

comment:3 Changed 9 years ago by flip

  • Description modified (diff)

In r2577 I added some caveats to a docstring that will hopefully help to address this.

Note: See TracTickets for help on using tickets.