Skip to content
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

PowerPC64 support in safe_address function #919

Closed
wants to merge 1 commit into from
Closed

PowerPC64 support in safe_address function #919

wants to merge 1 commit into from

Conversation

gustavotemple
Copy link

Add a ppc64-specific implementation of the safe_address
function with overflow checking.

@gustavotemple
Copy link
Author

@remicollet, @smalyshev, @datibbaw, @laruence: the PR #734 has been rebased in this one.

@remicollet
Copy link
Member

Tried against master on

 POWER8 (architected), altivec supported
 Linux foo 3.10.0-123.el7.ppc64 #1 SMP Mon May 5 11:18:37 EDT 2014 ppc64 ppc64 ppc64 GNU/Linux

This make ext/spl/tests/bug67247.phpt segfault:

Without the patch

size: 1
Fatal error: Possible integer overflow in memory allocation (2305843009213693953 * 16 + 0) in /home/remi/php-src/ext/spl/tests/bug67247.php on line 4

With:

size: 1
size: 2305843009213693953
Segfault

@remicollet
Copy link
Member

FYI, we now have 0 failed tests on ppc64, so testing will be easier (build with --disable-all, so no extension tested)

@gustavotemple
Copy link
Author

@remicollet, thank you very much :)

@remicollet
Copy link
Member

Any update on this one ? (still segfault)

@gustavotemple
Copy link
Author

Sorry @remicollet, not yet, I and my teammates (@caioso, @lbianc) we're still checking.

@remicollet
Copy link
Member

@gustavotemple no urgency ;)
I have return the ppc64 machine used to check these PR, but will be able to request another later.

Add a ppc64-specific implementation of the safe_address
function with overflow checking.
@gustavotemple
Copy link
Author

@remicollet, done, fixed.

@remicollet
Copy link
Member

Tested on

 POWER7 (architected), altivec supported
 Linux xxx 3.10.0-216.el7.ppc64 #1 SMP Tue Dec 9 15:02:02 EST 2014 ppc64 ppc64 ppc64 GNU/Linux

No regression detected. Fine :)

@php-pulls
Copy link

Comment on behalf of remi at php.net:

merged, thanks for improving PHP on PowerPC :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants