php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59563 Seg fault when using OauthProvider
Submitted: 2011-01-07 04:26 UTC Modified: 2011-01-15 13:16 UTC
From: djpate at gmail dot com Assigned:
Status: Closed Package: oauth (PECL)
PHP Version: 5_3 SVN-2011-01-07 (dev) OS: Ubuntu 10.10
Private report: No CVE-ID: None
 [2011-01-07 04:26 UTC] djpate at gmail dot com
Description:
------------
Hello,

I'm trying to make a basic OAuth provider script to test things out but I keep on getting seg fault error when the checkOAuthRequest() is fired.

Reproduce code:
---------------
Here is a link to my provider source code

https://github.com/djpate/OAuthProviderExample/blob/master/class/provider.class.php

And my client

https://github.com/djpate/OAuthProviderExample/blob/master/client/index.php

Expected result:
----------------
Actually It shouldnt do anything really because I havent wrote the method to get the request token but It should not segfault.

Actual result:
--------------
Here is my client output

exception 'OAuthException' with message 'making the request failed (dunno why)' in /var/www/OAuthProviderExample/client/index.php:4 Stack trace: #0 /var/www/OAuthProviderExample/client/index.php(4): OAuth->getRequestToken('http://89.159.5...') #1 {main}

And my error_log

[Fri Jan 07 10:18:53 2011] [notice] child pid 7728 exit signal Segmentation fault (11)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-07 04:39 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2011-01-07 05:18 UTC] djpate at gmail dot com
Here is my backtrace

Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal 11, Segmentation fault.
#0  0x012da995 in ?? () from /usr/lib/apache2/modules/libphp5.so
(gdb) bt
#0  0x012da995 in ?? () from /usr/lib/apache2/modules/libphp5.so
#1  0x0129a5d8 in _efree () from /usr/lib/apache2/modules/libphp5.so
#2  0x012b888e in _zval_dtor_func () from /usr/lib/apache2/modules/libphp5.so
#3  0x0105bde8 in php_pcre_match_impl () from /usr/lib/apache2/modules/libphp5.so
#4  0x00203c95 in oauth_provider_parse_auth_header (ht=0, return_value=0x22c50abc, return_value_ptr=0x0, this_ptr=<value optimized out>, return_value_used=0)
    at /tmp/pear/temp/oauth/provider.c:229
#5  zim_oauthprovider___construct (ht=0, return_value=0x22c50abc, return_value_ptr=0x0, this_ptr=<value optimized out>, return_value_used=0)
    at /tmp/pear/temp/oauth/provider.c:509
#6  0x0130bfba in ?? () from /usr/lib/apache2/modules/libphp5.so
#7  0x012e2a7e in execute () from /usr/lib/apache2/modules/libphp5.so
#8  0x012b8b76 in zend_execute_scripts () from /usr/lib/apache2/modules/libphp5.so
#9  0x0125d2f4 in php_execute_script () from /usr/lib/apache2/modules/libphp5.so
#10 0x0134b0fb in ?? () from /usr/lib/apache2/modules/libphp5.so
#11 0x00d41ff1 in ap_run_handler (r=0x22c90290) at /build/buildd/apache2-2.2.16/server/config.c:159
#12 0x00d45dd6 in ap_invoke_handler (r=0x22c90290) at /build/buildd/apache2-2.2.16/server/config.c:377
#13 0x00d55574 in ap_internal_redirect (new_uri=0x22c90268 "/OAuthProviderExample/oauth/index.php", r=0x22c86110)
    at /build/buildd/apache2-2.2.16/modules/http/http_request.c:502
#14 0x001d0389 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#15 0x00d41ff1 in ap_run_handler (r=0x22c86110) at /build/buildd/apache2-2.2.16/server/config.c:159
#16 0x00d45dd6 in ap_invoke_handler (r=0x22c86110) at /build/buildd/apache2-2.2.16/server/config.c:377
#17 0x00d55728 in ap_process_request (r=0x22c86110) at /build/buildd/apache2-2.2.16/modules/http/http_request.c:282
#18 0x00d52258 in ap_process_http_connection (c=0x22c80050) at /build/buildd/apache2-2.2.16/modules/http/http_core.c:190
#19 0x00d4a831 in ap_run_process_connection (c=0x22c80050) at /build/buildd/apache2-2.2.16/server/connection.c:43
#20 0x00d5abda in child_main (child_num_arg=<value optimized out>) at /build/buildd/apache2-2.2.16/server/mpm/prefork/prefork.c:662
#21 0x00d5af5e in make_child (s=<value optimized out>, slot=1) at /build/buildd/apache2-2.2.16/server/mpm/prefork/prefork.c:758
#22 0x00d5b32a in startup_children (_pconf=0x229540a8, plog=0x22986170, s=0x229588e8) at /build/buildd/apache2-2.2.16/server/mpm/prefork/prefork.c:776
#23 ap_mpm_run (_pconf=0x229540a8, plog=0x22986170, s=0x229588e8) at /build/buildd/apache2-2.2.16/server/mpm/prefork/prefork.c:997
#24 0x00d2ca4a in main (argc=3, argv=0xbfdaf0c4) at /build/buildd/apache2-2.2.16/server/main.c:742
 [2011-01-07 08:19 UTC] djpate at gmail dot com
It actually works when I compile Oauth from trunk instead of v1.0 from pecl.

This should go too pecl...
 [2011-01-07 12:26 UTC] jawed@php.net
Thanks for the info - the trunk version will be rolled up into 
the 1.1 release soon.

- JJ
 [2011-01-15 13:16 UTC] jawed@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC