Skip to content

Conversation

@danielsclint
Copy link

Grabbing integers from this row can result in an integer overflow without warning or error in the buffer_size calculation below.

The issue is documented in the Numpy documents:

Arithmetic is modular when using integer types, and no error is raised on overflow. That means that, on a 32-bit platform:

>> x = np.array([536870910, 536870910, 536870910, 536870910])
>> np.prod(x)  # random
16

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 86.125% when pulling c39a6d5 on danielsclint:ft_int_overflow into 367d414 on ActivitySim:master.

@bstabler
Copy link
Contributor

Thanks. I'll plan to merge this in when we make the next round of updates.

@bstabler bstabler changed the base branch from master to develop July 9, 2019 23:32
@bstabler bstabler merged commit 389f738 into ActivitySim:develop Jul 9, 2019
@danielsclint danielsclint deleted the ft_int_overflow branch December 20, 2019 18:59
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.

3 participants