Re: [PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-26 Thread Ivan Zanev
Thank you! On Wed, Aug 26, 2020 at 11:00 AM Alex wrote: > Dear Ivan, > > Some suggestions: > > - Build your own copy of the PHP embed library using ./configure > --enable-embed=shared or ./configure --enable-embed=static. Link against > that. > - If it doesn't work, get some already-working samp

Re: [PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-26 Thread Alex
Dear Ivan, Some suggestions: - Build your own copy of the PHP embed library using ./configure --enable-embed=shared or ./configure --enable-embed=static. Link against that. - If it doesn't work, get some already-working sample code for use of the PHP embed SAPI and modify it rather than starting

Re: [PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-26 Thread Ivan Zanev
Yes, it does. I recompiled php now with --configure --enable-embed=static and wrote a simple script: #include #include #include "sapi/embed/php_embed.h" int main(int argc, char *argv[]) { php_embed_init(argc, argv); HashTable *ht = zend_new_array(15); return 0; }

Re: [PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-25 Thread Levi Morrison via internals
On Tue, Aug 25, 2020 at 5:31 AM Ivan Zanev wrote: > > Hello, > > I'm trying to learn a bit more about HashTable in PHP internally and how > memory is allocated when generating arrays with various sizes. I created a > simple C script that would call > > HashTable *ht = zend_new_array(15); > > Howev

[PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-25 Thread Ivan Zanev
Hello, I'm trying to learn a bit more about HashTable in PHP internally and how memory is allocated when generating arrays with various sizes. I created a simple C script that would call HashTable *ht = zend_new_array(15); However, when I compile the script with gcc, I get segmentation fault; gd

[PHP-DEV] Segmentation fault when try to get the 'current_execute_data' on a PHP extension

2017-04-20 Thread daniel gatis
I'm trying to develop a php extension for print all functions call like a backtrace. But when I'm trying to get the current function a segmentation fault is throw. What is the problem with my code? My php test code: function a() { b(); } function b() { c(); } function c() { var_dump

Re: [PHP-DEV] Segmentation fault between 5.5 and 5.6 with remote address in stream socket

2016-06-17 Thread Ivan Enderlin
Yup, a bad copy/paste. On 17/06/16 16:06, Julien Pauli wrote: You seem to be linking the wrong PHP commit. I'll have a look at it. Julien On Fri, Jun 17, 2016 at 2:58 PM, Ivan Enderlin wrote: Hello internal, I have just opened a new bug, https://bugs.php.net/72439 (source of the story

Re: [PHP-DEV] Segmentation fault between 5.5 and 5.6 with remote address in stream socket

2016-06-17 Thread Julien Pauli
You seem to be linking the wrong PHP commit. I'll have a look at it. Julien On Fri, Jun 17, 2016 at 2:58 PM, Ivan Enderlin wrote: > Hello internal, > > I have just opened a new bug, https://bugs.php.net/72439 (source of the > story https://github.com/hoaproject/Websocket/issues/66). It seem

[PHP-DEV] Segmentation fault between 5.5 and 5.6 with remote address in stream socket

2016-06-17 Thread Ivan Enderlin
Hello internal, I have just opened a new bug, https://bugs.php.net/72439 (source of the story https://github.com/hoaproject/Websocket/issues/66). It seems to be a regression between 5.5 and 5.6. I quickly suspect https://github.com/php/php-src/commit/4a2e40bb861bc3cf5fb6863e57486ed60316e97c t

Re: [PHP-DEV] Segmentation fault in PHP 7.0.3 (and earlier versions)

2016-02-06 Thread Rasmus Lerdorf
On 02/06/2016 10:10 AM, Simon Svensson wrote: > On 05/02/16 22:29, Rasmus Lerdorf wrote: >> On 02/05/2016 11:39 AM, Simon Svensson wrote: >>> I am unable to reproduce the error with this recompiled source, both >>> with the /usr/local/php70/bin/php and /usr/local/php70-debug/bin/php. >>> This is th

Re: [PHP-DEV] Segmentation fault in PHP 7.0.3 (and earlier versions)

2016-02-06 Thread Simon Svensson
On 05/02/16 22:29, Rasmus Lerdorf wrote: > On 02/05/2016 11:39 AM, Simon Svensson wrote: >> I am unable to reproduce the error with this recompiled source, both >> with the /usr/local/php70/bin/php and /usr/local/php70-debug/bin/php. >> This is the same experience I had with earlier releases, where

Re: [PHP-DEV] Segmentation fault in PHP 7.0.3 (and earlier versions)

2016-02-05 Thread Rasmus Lerdorf
On 02/05/2016 11:39 AM, Simon Svensson wrote: > I am unable to reproduce the error with this recompiled source, both > with the /usr/local/php70/bin/php and /usr/local/php70-debug/bin/php. > This is the same experience I had with earlier releases, where I have > been unable to reproduce the segment

Re: [PHP-DEV] Segmentation fault in PHP 7.0.3 (and earlier versions)

2016-02-05 Thread Simon Svensson
On 05/02/16 19:57, julien PAULI wrote: > On Fri, Feb 5, 2016 at 7:37 PM, Simon Svensson wrote: >> Hi, >> >> I'm using Ondřej Surý's ppa which was recently upgraded to PHP 7.0.3. My >> test-suite is causing segmentation faults since 7.0.0 RC5, including the >> 7.0.3 release. >> >> I can reproduce t

Re: [PHP-DEV] Segmentation fault in PHP 7.0.3 (and earlier versions)

2016-02-05 Thread julien PAULI
On Fri, Feb 5, 2016 at 7:37 PM, Simon Svensson wrote: > Hi, > > I'm using Ondřej Surý's ppa which was recently upgraded to PHP 7.0.3. My > test-suite is causing segmentation faults since 7.0.0 RC5, including the > 7.0.3 release. > > I can reproduce this consistently by running my test-suite in PHP

[PHP-DEV] Segmentation fault in PHP 7.0.3 (and earlier versions)

2016-02-05 Thread Simon Svensson
Hi, I'm using Ondřej Surý's ppa which was recently upgraded to PHP 7.0.3. My test-suite is causing segmentation faults since 7.0.0 RC5, including the 7.0.3 release. I can reproduce this consistently by running my test-suite in PHPUnit. Identifying the tests executing when the fault occurs (using

Re: [PHP-DEV] segmentation fault

2011-08-01 Thread Tomas Brastavičius
Here is a corresponding bug report: https://bugs.php.net/bug.php?id=55339 Regards, Tomas Brastavičius > Hi! > > > I would like to ask if the following backtrace contains enough > > information to identify the bug ? Perhaps someone may identify from the > > backtrace a PHP function/code that cau

Re: [PHP-DEV] segmentation fault

2011-05-12 Thread Stas Malyshev
Hi! I would like to ask if the following backtrace contains enough information to identify the bug ? Perhaps someone may identify from the backtrace a PHP function/code that causes the segfault and I am able to provide more info in a bug report ? It would be useful to know: 1. Which code leads

[PHP-DEV] segmentation fault

2011-05-10 Thread Tomas Brastavičius
Hi, I would like to ask if the following backtrace contains enough information to identify the bug ? Perhaps someone may identify from the backtrace a PHP function/code that causes the segfault and I am able to provide more info in a bug report ? Program received signal SIGSEGV, Segmentation faul

[PHP-DEV] segmentation fault at to small stacksize( ulimit -s)

2010-09-02 Thread Hajo Locke
Hello, i have a question the installation-list could not solve.thus i try my luck here... I have a script (php-cli) which results in segfault. If i increase stack size by... ulimit -s unlimited ...the script is running and shows correct memory-limit error message. My system's stack size def

[PHP-DEV] Segmentation fault, where to look when debugging?

2009-03-23 Thread Arjen Brouwer
Hi all, I also posted this message on php.general last firday, but got no response. Maybe you can help me? Our CMS segfaults on certain pages. It's a lot of code to debug so I wonder if someone can point in me in de right direction where to start looking when debugging. The GDB backtrace points

Re: [PHP-DEV] segmentation fault

2007-03-19 Thread Richard Lynch
> On 3/16/07, Oliver Block <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I receive a segmentation fault on a >> >> RETVAL_STRING(some_module_global, 1); >> >> The problem disappears if I change it to >> >> RETVAL_STRING(some_module_global, 0); >> >> Is anybody interested in the data? >> >> Regards

Re: [PHP-DEV] segmentation fault

2007-03-15 Thread Tijnema !
On 3/16/07, Oliver Block <[EMAIL PROTECTED]> wrote: Hello, I receive a segmentation fault on a RETVAL_STRING(some_module_global, 1); The problem disappears if I change it to RETVAL_STRING(some_module_global, 0); Is anybody interested in the data? Regards, Oliver I never had any segfa

[PHP-DEV] segmentation fault

2007-03-15 Thread Oliver Block
Hello, I receive a segmentation fault on a RETVAL_STRING(some_module_global, 1); The problem disappears if I change it to RETVAL_STRING(some_module_global, 0); Is anybody interested in the data? Regards, Oliver -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] Segmentation Fault

2006-12-18 Thread Pierre
On 12/18/06, Richard Morris <[EMAIL PROTECTED]> wrote: Hi, Is there a better place that this message should be posted to? This list is fine for this post. Another good place is http://bugs.php.net --Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://

Re: [PHP-DEV] Segmentation Fault

2006-12-18 Thread Richard Morris
Hi, Is there a better place that this message should be posted to? Thanks. Richard Morris wrote: Hello all, I was told this might be a better list to ask this question... I was experimenting with the imap_* library functions trying to see if I could get a PHP script to access a folder on o

[PHP-DEV] Segmentation Fault

2006-12-13 Thread Richard Morris
Hello all, I was told this might be a better list to ask this question... I was experimenting with the imap_* library functions trying to see if I could get a PHP script to access a folder on our IMAP server and I ran into a problem. I was trying to get a simple script to work which simply o

Re: [PHP-DEV] segmentation fault when passing arguments by reference or importing global variables

2005-02-22 Thread Martin Sarsale
I've been noticing the same things, and still trying to figure out where it happens. It has most likely to do with returning-by-reference in the wrong places. It's also not very easy to reproduce the problem - I already spoke to several people including the guys that wrote zend, but they don't seem

Re: [PHP-DEV] segmentation fault when passing arguments by reference or importing global variables

2005-02-21 Thread Todd Ruth
Ahh... my favorite topic. I think I covered all the cases our company has hit in the following message to this list: http://marc.theaimsgroup.com/?l=php-dev&m=109631219107237&w=2 I've never seen a response as to whether there is hope for fixes of these problems. I ended up hacking at an already

Re: [PHP-DEV] segmentation fault when passing arguments by reference or importing global variables

2005-02-21 Thread Michael Walter
I've as well experienced this problem several times (in a medium-size code base). By returning-by-reference in the wrong places, do you mean something like function foo() { return 10;} $bar=&foo(); I'm pretty convinced that even with "correct" (in that respect) code the crash still occurs. Mi

Re: [PHP-DEV] segmentation fault when passing arguments by reference or importing global variables

2005-02-21 Thread Martin Sarsale
Derick Rethans wrote: I've been noticing the same things, and still trying to figure out where it happens. It has most likely to do with returning-by-reference in the wrong places. What do you mean with returning by reference in the wrong places? could you give me an example? -- No virus found in

Re: [PHP-DEV] segmentation fault when passing arguments by reference or importing global variables

2005-02-21 Thread Derick Rethans
On Mon, 21 Feb 2005, Martin Sarsale wrote: > Im having some weird problems here. We're working on a big project, > based on PHP and we found that some code that used to work, is doing > very strange things. I've been noticing the same things, and still trying to figure out where it happens. It ha

[PHP-DEV] segmentation fault when passing arguments by reference or importing global variables

2005-02-21 Thread Martin Sarsale
Dear All: Im having some weird problems here. We're working on a big project, based on PHP and we found that some code that used to work, is doing very strange things. Im getting segfaults in some parts of the code, for example: function XXX(&$databaseConnection, $xxx) { or global $xxx; At first

Re: [PHP-DEV] Segmentation fault in html_entity_decode

2005-01-12 Thread Kamesh Jayachandran
Hi Moriyoshi, My mistake. I Thought you would have fixed these 2 in one commit and diffed the latest with earlier one version and found only one fix. Now things work fine. With regards Kamesh Jayachandran On Wed, 12 Jan 2005 17:27:06 +0900, "Moriyoshi Koizumi" <[EMAIL PROTECTED]> said: > > On

Re: [PHP-DEV] Segmentation fault in html_entity_decode

2005-01-12 Thread Moriyoshi Koizumi
On 2005/01/12, at 16:31, Kamesh Jayachandran wrote: Hi Moriyoshi, Still ent_uni_8592_9002's actual size is 410 but accessed with a index 410. Huh? I'm confident about it :) It's certainly 411. #include static char *ent_uni_8592_9002[] = { /* 8592 (0x2190) */ "larr", "uarr", "rarr"

Re: [PHP-DEV] Segmentation fault in html_entity_decode

2005-01-11 Thread Kamesh Jayachandran
Hi Moriyoshi, Still ent_uni_8592_9002's actual size is 410 but accessed with a index 410. With regards Kamesh Jayachandran On Wed, 12 Jan 2005 05:51:01 +0900, "Moriyoshi Koizumi" <[EMAIL PROTECTED]> said: > Now fixed in CVS. Thanks for the good report. > > Moriyoshi > > On 2005/01/10, at 22:30,

Re: [PHP-DEV] Segmentation fault in html_entity_decode

2005-01-11 Thread Moriyoshi Koizumi
Now fixed in CVS. Thanks for the good report. Moriyoshi On 2005/01/10, at 22:30, Kamesh Jayachandran wrote: Hi All, The following script causes a segmentation fault in NetWare but not on Windows or Linux versions of php-5.0.3 I can not attribute to NetWare instead I could see the defect in our ext

[PHP-DEV] Segmentation fault in html_entity_decode

2005-01-10 Thread Kamesh Jayachandran
Hi All, The following script causes a segmentation fault in NetWare but not on Windows or Linux versions of php-5.0.3 I can not attribute to NetWare instead I could see the defect in our ext/standard/html.c The cause seems to be the following arrays are accessed with a index that is beyond their

Re: [PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Jason Garber
Sorry, The actual bug is http://bugs.php.net/bug.php?id=29080 29081 is a duplicate -Jason At 7/9/2004 05:16 PM -0400, Jason Garber wrote: Bug #29081 Segmentation Fault when using Interface http://bugs.php.net/bug.php?id=29081 -Jason At 7/9/2004 01:30 PM +0200, you wrote: On Fri, 9 Jul 2004, Ja

Re: [PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Jason Garber
Bug #29081 Segmentation Fault when using Interface http://bugs.php.net/bug.php?id=29081 -Jason At 7/9/2004 01:30 PM +0200, you wrote: On Fri, 9 Jul 2004, Jason Garber wrote: > Hello, > > I discovered this problem tonight while working on a new PHP 5 class that > uses an interface. The code ex

Re: [PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Derick Rethans
On Fri, 9 Jul 2004, Jason Garber wrote: > Hello, > > I discovered this problem tonight while working on a new PHP 5 class that > uses an interface. The code example came from > http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading5 Please also file this bug inthe bug system (bugs.ph

Re: [PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Zeev Suraski
We'll look into it and let you know whether it's in PHP or in one of the extensions modules. Thanks for the report! Zeev At 10:50 09/07/2004, Jason Garber wrote: Hello, I discovered this problem tonight while working on a new PHP 5 class that uses an interface. The code example came from http:

[PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Jason Garber
Hello, I discovered this problem tonight while working on a new PHP 5 class that uses an interface. The code example came from http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading5 class MyException implements Throwable { public function getMessage() { echo "He

Re: [PHP-DEV] "Segmentation fault" w/ php5.0.0rc3 on macosx10.3.4

2004-06-16 Thread Dan Kalowsky
Well if you wish to continue adding more challenges to solving your goal, you could add in the latest CVS versions of gcc as well. Honest, your best bet to start debugging this is to place PHP5+PGPGACL into a stable environment. If it doesn't reproduce there, introduce a semi-stable environmen

Re: [PHP-DEV] "Segmentation fault" w/ php5.0.0rc3 on macosx10.3.4

2004-06-16 Thread OpenMacNews
-- On Wednesday, June 16, 2004 2:49 PM -0700 Dan Kalowsky <[EMAIL PROTECTED]> wrote: A good start would be to move away from a completely developer environment like you're using. I'd suggest either working with PHP5 or Apache2-dev, but not both at the same time. That should help you narrow thing

Re: [PHP-DEV] "Segmentation fault" w/ php5.0.0rc3 on macosx10.3.4

2004-06-16 Thread Dan Kalowsky
A good start would be to move away from a completely developer environment like you're using. I'd suggest either working with PHP5 or Apache2-dev, but not both at the same time. That should help you narrow things down a bit more. In reality, I'd narrow to Apache1 as well if you're trying to

[PHP-DEV] "Segmentation fault" w/ php5.0.0rc3 on macosx10.3.4

2004-06-16 Thread OpenMacNews
hi all, i'd posted this on the phpgacl list, and a kind soul there suggested to try here ... i'm looking for any/help help in starting to debug this. thx, richard Segfault, so I'm assuming its a PHP5 issue. I haven't actually tested phpGACL on PHP5 yet, but in theory it should work, as PHP5 is back

Re: [PHP-DEV] Segmentation fault in php4-STABLE-200311270830

2003-11-27 Thread Ilia Alshanetsky
Could you please supply the PHP script used? Ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Segmentation fault in php4-STABLE-200311270830

2003-11-27 Thread Marcus Boerger
Hello Jean-Pierre, Thursday, November 27, 2003, 1:27:25 PM, you wrote: > - Original Message - > From: "Ilia Alshanetsky" <[EMAIL PROTECTED]> > To: "Jean-Pierre Arneodo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday,

Re: [PHP-DEV] Segmentation fault in php4-STABLE-200311270830

2003-11-27 Thread Jean-Pierre Arneodo
- Original Message - From: "Ilia Alshanetsky" <[EMAIL PROTECTED]> To: "Jean-Pierre Arneodo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 27, 2003 2:18 AM Subject: Re: [PHP-DEV] Segmentation fault in v4.3.4 > This problem

Re: [PHP-DEV] Segmentation fault in v4.3.4

2003-11-26 Thread Ilia Alshanetsky
This problem is now fixed, thank you for reporting it. Ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Segmentation fault in v4.3.4

2003-11-26 Thread Derick Rethans
On Wed, 26 Nov 2003, Jean-Pierre Arneodo wrote: > Here the result of valgrind, thanks to Derick! > Now gurus can analyse the result. I could reproduce this with 4.3dev, but not with PHP 5. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/

Re: [PHP-DEV] Segmentation fault in v4.3.4

2003-11-26 Thread Jean-Pierre Arneodo
291 total-reg-r. --17820--sanity: 140 cheap, 6 expensive checks. --17820--ccalls: 72861 C calls, 62% saves+restores avoided (270194 bytes) --17820-- 95773 args, avg 0.89 setup instrs each (20064 bytes) --17820--0% clear the stack (218583 bytes) --17820--

Re: [PHP-DEV] Segmentation fault in v4.3.4

2003-11-26 Thread Derick Rethans
On Wed, 26 Nov 2003, Jean-Pierre Arneodo wrote: > The script uses 3 extensions a lot: > - xml: EXPAT Version 1.95.6 > - curl: libcurl/7.10.2 OpenSSL/0.9.6b zlib/1.1.4 > - mysql: Client API version 4.0.15 (The MySQL server and lib on the host > is a 4.0.16) > > 80 classes are involved, it is diff

Re: [PHP-DEV] Segmentation fault in v4.3.4

2003-11-26 Thread Jean-Pierre Arneodo
13] => gettext [14] => gd [15] => curl [16] => ctype [17] => bz2 [18] => zlib ) - Original Message - From: "Andi Gutmans" <[EMAIL PROTECTED]> To: "Jean-Pierre Arneodo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday,

Re: [PHP-DEV] Segmentation fault in v4.3.4

2003-11-25 Thread Andi Gutmans
Hi, We really need you to cut down this script to a minimum (10-20 lines) which reproduces the problem. Thanks, Andi At 10:38 PM 11/25/2003 +0100, Jean-Pierre Arneodo wrote: Hi, I've a seg fault with 4.3.4 To find where I configure with --enable-debug Now no seg fault but the cli print somet

[PHP-DEV] Segmentation fault in v4.3.4

2003-11-25 Thread Jean-Pierre Arneodo
Hi, I've a seg fault with 4.3.4 To find where I configure with --enable-debug Now no seg fault but the cli print something. How to investigate more ? JP [Tue Nov 25 22:11:24 2003] Script: './wsp_shell_instrument_synchronize.php' --- /home/jpa/dev/php-4.3