Skip to content

fix: uniformly treat flow start time as a 64-bit unsigned integer#9

Open
matt-dbs wants to merge 1 commit into
HLC-Lab:mainfrom
matt-dbs:matt-dbs/u64-start
Open

fix: uniformly treat flow start time as a 64-bit unsigned integer#9
matt-dbs wants to merge 1 commit into
HLC-Lab:mainfrom
matt-dbs:matt-dbs/u64-start

Conversation

@matt-dbs
Copy link
Copy Markdown

Note

Like #8, this is another latent issue that bit us because we were writing our own connection matrices.

Start times are being parsed in as doubles, as if it is possible to specify fractional start times. For examples, 42.5ps. However internally they are stored into connection.start, a simtime_picosec (a.k.a. uint64_t). Apart from silently truncating fractional numbers this also leads to corrupted start times if a value greater than UINT64_MAX is specified.

This change causes parsing to reject fractional or out-of-64-bit-range values.

Start times are being parsed in as `double`s, as if it is possible to specify
fractional start times. For examples, 42.5ps. However internally they are stored
into `connection.start`, a `simtime_picosec` (a.k.a. `uint64_t`). Apart from
silently truncating fractional numbers this also leads to corrupted start times
if a value greater than `UINT64_MAX` is specified.

This change causes parsing to reject fractional or out-of-64-bit-range values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant