New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integer overflow when setting maxIdleTime #1357

Merged
merged 1 commit into from Jan 27, 2015

Conversation

Projects
None yet
2 participants
@vividtone
Contributor

vividtone commented Jan 25, 2015

PassengerPoolIdleTime cannot be set greater than 4294 ((2 ** 32 - 1) / 1000000) because of integer overflow.

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jan 26, 2015

Member

Thank you for catching this bug. Can I ask you to sign our contributor agreement? We need this before we can merge any patches.

Member

FooBarWidget commented Jan 26, 2015

Thank you for catching this bug. Can I ask you to sign our contributor agreement? We need this before we can merge any patches.

@vividtone

This comment has been minimized.

Show comment
Hide comment
@vividtone

vividtone Jan 27, 2015

Contributor

Thanks for reviewing the patch.
I have sent a scan of the signed contributor agreement by e-mail.

Contributor

vividtone commented Jan 27, 2015

Thanks for reviewing the patch.
I have sent a scan of the signed contributor agreement by e-mail.

FooBarWidget added a commit that referenced this pull request Jan 27, 2015

Merge pull request #1357 from vividtone/fix_maxIdleTime_overflow
Fix integer overflow when setting maxIdleTime

@FooBarWidget FooBarWidget merged commit 622485f into phusion:master Jan 27, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jan 27, 2015

Member

Thank you, it has been merged now.

Member

FooBarWidget commented Jan 27, 2015

Thank you, it has been merged now.

FooBarWidget added a commit that referenced this pull request Jan 27, 2015

Give credit to Maeda Go.
See GH-1357.

[ci:skip]
@vividtone

This comment has been minimized.

Show comment
Hide comment
@vividtone

vividtone Jan 27, 2015

Contributor

I am happy to see the patch merged. Thank you.
Could it be backported to stable-4.0?

Contributor

vividtone commented Jan 27, 2015

I am happy to see the patch merged. Thank you.
Could it be backported to stable-4.0?

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jan 27, 2015

Member

I don't think 4.x suffers from this problem. Besides, 5.0 final is slated for next month.

Member

FooBarWidget commented Jan 27, 2015

I don't think 4.x suffers from this problem. Besides, 5.0 final is slated for next month.

@vividtone

This comment has been minimized.

Show comment
Hide comment
@vividtone

vividtone Jan 27, 2015

Contributor

I will wait 5.0 but Passenger 4.x have the same problem. I found the problem in 4.0.56 at first.

Please see the following. Both options.poolIdleTime and 1000000 are 32 bit width(unsigned int). So the result of the expression cannot be greater than 2**32 - 1.

https://github.com/phusion/passenger/blob/stable-4.0/ext/common/agents/HelperAgent/Main.cpp#L472

Contributor

vividtone commented Jan 27, 2015

I will wait 5.0 but Passenger 4.x have the same problem. I found the problem in 4.0.56 at first.

Please see the following. Both options.poolIdleTime and 1000000 are 32 bit width(unsigned int). So the result of the expression cannot be greater than 2**32 - 1.

https://github.com/phusion/passenger/blob/stable-4.0/ext/common/agents/HelperAgent/Main.cpp#L472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment