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

fix possible segfault in php_smb_ops_close when called after php_smb_… #82

Merged
merged 1 commit into from
Feb 10, 2021

Conversation

remicollet
Copy link
Contributor

…pool_cleanup (unclosed stream)

@remicollet
Copy link
Contributor Author

For memory (discovered during test for #81)

#0  0x00007ffff7294010 in ?? ()
#1  0x00007ffff7fa2371 in php_smb_ops_close (stream=0x7ffff728a380, close_handle=<optimized out>) at /work/GIT/pecl-and-ext/smbclient/smb_streams.c:176
#2  0x0000555555791784 in _php_stream_free (stream=<optimized out>, close_options=11) at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/main/streams/streams.c:475
#3  0x0000555555791a46 in stream_resource_regular_dtor (rsrc=<optimized out>) at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/main/streams/streams.c:1681
#4  0x00005555557f5585 in zend_resource_dtor (res=<optimized out>) at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/Zend/zend_list.c:72
#5  0x00005555557f5b39 in zend_close_rsrc_list (ht=<optimized out>) at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/Zend/zend_list.c:220
#6  0x00005555557d25e2 in shutdown_executor () at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/Zend/zend_execute_API.c:272
#7  0x00005555557e1a98 in zend_deactivate () at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/Zend/zend.c:1225
#8  0x000055555577b461 in php_request_shutdown (dummy=<optimized out>) at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/main/main.c:1805
#9  0x0000555555871e9c in do_cli (argc=5, argv=0x555555e22600) at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/sapi/cli/php_cli.c:1109
#10 0x000055555563a60e in main (argc=5, argv=0x555555e22600) at /usr/src/debug/php80-php-8.0.2-1.fc33.remi.x86_64/sapi/cli/php_cli.c:1335

@eduardok eduardok merged commit ac57c57 into eduardok:master Feb 10, 2021
@eduardok
Copy link
Owner

@remicollet I will release 1.0.5 tonight when I'm home, had to come to the office today, thanks :)

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.

2 participants