Skip to content

Fixed bug #61936 ____executor_globals fails when EG/CG symbol may not visible - #74

Closed
reeze wants to merge 1 commit into
php:PHP-5.3from
reeze:fix-eg-cg-symbol
Closed

reeze wants to merge 1 commit into
php:PHP-5.3from
reeze:fix-eg-cg-symbol

Conversation

@reeze

@reeze reeze commented May 4, 2012

Copy link
Copy Markdown
Contributor

Hi,
I've fill bug ticket #61936 since @pierre says we need a bug ticket to record.
see: https://bugs.php.net/bug.php?id=61936.

since struct _zend_executor_globals is always available so use this struct is more portable.

This affect any command defined need $eg such as print_ht print_cvs printzv etc..

BTW: This happened only in ZTS build and if you didn't call backtrace command.

Thanks。

@php-pulls

Copy link
Copy Markdown

Hi:
I can not reproduce this in 5.3-zts or 5.4-zts.

about your words: "because in some module eg:zend_gc.c did have
zend_executor_global exposed(Only ZTS
model affected,...."

I think you mean "didn't", right?

  1. zend_executor_globals is a name, not a symbol, actullay it's is
    used in compiling phase, so there is no exposing or not exposing
    concept for it.
  2. did you compile you PHP with -g?

on my box:

Breakpoint 1, gc_zval_possible_root (zv=0x14b13d8, tsrm_ls=0x123d090)
at /home/huixinchen/opensource/php-5.3/Zend/zend_gc.c:132
132 if (UNEXPECTED(GC_G(free_list) != NULL &&
(gdb) p basic_functions_module.zts
$2 = 1 '\001'
(gdb) printzv zv
0x014b13d8 array(1): {
0 => 0x014b15a0 string(10): "/tmp/1.php"
}
(gdb) print (zend_compiler_globals *)zv
$3 = (zend_compiler_globals *) 0x14b13d8

thanks

On Fri, May 4, 2012 at 12:02 PM, Reeze Xia
reply@reply.github.com
wrote:

Hi,
 I've fill bug ticket #61936 since @pierre  we need a tick.
see:  https://bugs.php.net/bug.php?id=61936.

since struct _zend_executor_globals is always available so I change it to it.

Thanks。

You can merge this Pull Request by running:

 git pull https://github.com/reeze/php-src fix-eg-cg-symbol

Or you can view, comment on it, or merge it online at:

 #74

-- Commit Summary --

  • Fixed bug #61936  ____executor_globals fails when EG/CG symbol may not visible in some module

-- File Changes --

M .gdbinit (4)

-- Patch Links --

 https://github.com/php/php-src/pull/74.patch
 https://github.com/php/php-src/pull/74.diff


Reply to this email directly or view it on GitHub:
#74

Git Pull Requests Mailing List (https://github.com/php)
To unsubscribe, visit: http://www.php.net/unsub.php

Laruence  Xinchen Hui
http://www.laruence.com/

@reeze

reeze commented May 4, 2012

Copy link
Copy Markdown
Contributor Author

在 2012年5月4日星期五,下午11:38,Account for PHP Pull Requests 写道:

Hi:
I can not reproduce this in 5.3-zts or 5.4-zts.

about your words: "because in some module eg:zend_gc.c did have
zend_executor_global exposed(Only ZTS
model affected,...."

I think you mean "didn't", right?
Yes, I mean not , sorry I can't update bug description. I add a comment after bug ticket.

  1. zend_executor_globals is a name, not a symbol, actullay it's is
    used in compiling phase, so there is no exposing or not exposing
    concept for it.
    I mean not all of the module included the header which typedef struct _zend_executor_global,
    so when break in these module, typename zend_execute_global are not visible.
  2. did you compile you PHP with -g?
    Yes

on my box:

Breakpoint 1, gc_zval_possible_root (zv=0x14b13d8, tsrm_ls=0x123d090)
at /home/huixinchen/opensource/php-5.3/Zend/zend_gc.c:132
132 if (UNEXPECTED(GC_G(free_list) != NULL &&
(gdb) p basic_functions_module.zts
$2 = 1 '\001'
(gdb) printzv zv
0x014b13d8 array(1): {
0 => 0x014b15a0 string(10): "/tmp/1.php"
}
(gdb) print (zend_compiler_globals *)zv
$3 = (zend_compiler_globals *) 0x14b13d8

Oh I forgot to mention one key point, when using backtrace command gdb seems to load all of the symbol,
so you don't run bt command before printzv, it will show up.

thanks

On Fri, May 4, 2012 at 12:02 PM, Reeze Xia
<reply@reply.github.com (mailto:reply@reply.github.com)>
wrote:

Hi,
I've fill bug ticket #61936 since @pierre we need a tick.
see: https://bugs.php.net/bug.php?id=61936.

since struct _zend_executor_globals is always available so I change it to it.

Thanks。

You can merge this Pull Request by running:

git pull https://github.com/reeze/php-src fix-eg-cg-symbol

Or you can view, comment on it, or merge it online at:

#74

-- Commit Summary --

  • Fixed bug #61936 ____executor_globals fails when EG/CG symbol may not visible in some module

-- File Changes --

M .gdbinit (4)

-- Patch Links --

https://github.com/php/php-src/pull/74.patch
https://github.com/php/php-src/pull/74.diff


Reply to this email directly or view it on GitHub:
#74

Git Pull Requests Mailing List (https://github.com/php)
To unsubscribe, visit: http://www.php.net/unsub.php

Laruence Xinchen Hui
http://www.laruence.com/


Reply to this email directly or view it on GitHub:
#74 (comment)

@reeze

reeze commented May 4, 2012

Copy link
Copy Markdown
Contributor Author

Maybe this is related to gdb lazy symbol loading .
I'm using gdb 6.3. what about you?

➜ php-src git:(PHP-5.4) ✗ gdb -v
GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)

reeze | simpie.com

在 2012年5月4日星期五,下午11:38,Account for PHP Pull Requests 写道:

Hi:
I can not reproduce this in 5.3-zts or 5.4-zts.

about your words: "because in some module eg:zend_gc.c did have
zend_executor_global exposed(Only ZTS
model affected,...."

I think you mean "didn't", right?

  1. zend_executor_globals is a name, not a symbol, actullay it's is
    used in compiling phase, so there is no exposing or not exposing
    concept for it.
  2. did you compile you PHP with -g?

on my box:

Breakpoint 1, gc_zval_possible_root (zv=0x14b13d8, tsrm_ls=0x123d090)
at /home/huixinchen/opensource/php-5.3/Zend/zend_gc.c:132
132 if (UNEXPECTED(GC_G(free_list) != NULL &&
(gdb) p basic_functions_module.zts
$2 = 1 '\001'
(gdb) printzv zv
0x014b13d8 array(1): {
0 => 0x014b15a0 string(10): "/tmp/1.php"
}
(gdb) print (zend_compiler_globals *)zv
$3 = (zend_compiler_globals *) 0x14b13d8

thanks

On Fri, May 4, 2012 at 12:02 PM, Reeze Xia
<reply@reply.github.com (mailto:reply@reply.github.com)>
wrote:

Hi,
I've fill bug ticket #61936 since @pierre we need a tick.
see: https://bugs.php.net/bug.php?id=61936.

since struct _zend_executor_globals is always available so I change it to it.

Thanks。

You can merge this Pull Request by running:

git pull https://github.com/reeze/php-src fix-eg-cg-symbol

Or you can view, comment on it, or merge it online at:

#74

-- Commit Summary --

  • Fixed bug #61936 ____executor_globals fails when EG/CG symbol may not visible in some module

-- File Changes --

M .gdbinit (4)

-- Patch Links --

https://github.com/php/php-src/pull/74.patch
https://github.com/php/php-src/pull/74.diff


Reply to this email directly or view it on GitHub:
#74

Git Pull Requests Mailing List (https://github.com/php)
To unsubscribe, visit: http://www.php.net/unsub.php

Laruence Xinchen Hui
http://www.laruence.com/


Reply to this email directly or view it on GitHub:
#74 (comment)

@reeze

reeze commented May 4, 2012

Copy link
Copy Markdown
Contributor Author

I can confirm that, if I add a test varible zend_executor_globals a; in zend_gc.c and compile
printzv works fine.

It seems that if the symbol not used in a module, it will not be saved for debug.

在 2012年5月4日星期五,下午11:38,Account for PHP Pull Requests 写道:

Hi:
I can not reproduce this in 5.3-zts or 5.4-zts.

about your words: "because in some module eg:zend_gc.c did have
zend_executor_global exposed(Only ZTS
model affected,...."

I think you mean "didn't", right?

  1. zend_executor_globals is a name, not a symbol, actullay it's is
    used in compiling phase, so there is no exposing or not exposing
    concept for it.
  2. did you compile you PHP with -g?

on my box:

Breakpoint 1, gc_zval_possible_root (zv=0x14b13d8, tsrm_ls=0x123d090)
at /home/huixinchen/opensource/php-5.3/Zend/zend_gc.c:132
132 if (UNEXPECTED(GC_G(free_list) != NULL &&
(gdb) p basic_functions_module.zts
$2 = 1 '\001'
(gdb) printzv zv
0x014b13d8 array(1): {
0 => 0x014b15a0 string(10): "/tmp/1.php"
}
(gdb) print (zend_compiler_globals *)zv
$3 = (zend_compiler_globals *) 0x14b13d8

thanks

On Fri, May 4, 2012 at 12:02 PM, Reeze Xia
<reply@reply.github.com (mailto:reply@reply.github.com)>
wrote:

Hi,
I've fill bug ticket #61936 since @pierre we need a tick.
see: https://bugs.php.net/bug.php?id=61936.

since struct _zend_executor_globals is always available so I change it to it.

Thanks。

You can merge this Pull Request by running:

git pull https://github.com/reeze/php-src fix-eg-cg-symbol

Or you can view, comment on it, or merge it online at:

#74

-- Commit Summary --

  • Fixed bug #61936 ____executor_globals fails when EG/CG symbol may not visible in some module

-- File Changes --

M .gdbinit (4)

-- Patch Links --

https://github.com/php/php-src/pull/74.patch
https://github.com/php/php-src/pull/74.diff


Reply to this email directly or view it on GitHub:
#74

Git Pull Requests Mailing List (https://github.com/php)
To unsubscribe, visit: http://www.php.net/unsub.php

Laruence Xinchen Hui
http://www.laruence.com/


Reply to this email directly or view it on GitHub:
#74 (comment)

@php-pulls

Copy link
Copy Markdown

On Fri, May 4, 2012 at 11:49 PM, Reeze Xia
reply@reply.github.com
wrote:

在 2012年5月4日星期五,下午11:38,Account for PHP Pull Requests 写道:

Hi:
 I can not reproduce this in 5.3-zts or 5.4-zts.

 about your words: "because in some module eg:zend_gc.c did have
zend_executor_global exposed(Only ZTS
model affected,...."

 I think you mean "didn't", right?
Yes, I mean not , sorry I can't update bug description. I add a comment after bug ticket.

 1. zend_executor_globals is a name, not a symbol, actullay it's is
used in compiling phase, so there is no exposing or not exposing
concept for it.
I mean not all of the module included the header which typedef struct _zend_executor_global,
so when break in these module, typename zend_execute_global are not visible.
....., No comment for your logic, but how can you explain the struct
_zend_execute_globals "visible"? since it's defination is in the same
header file.

please DO NOT fix sth just by a wild guessing. thanks

 2. did you compile you PHP with -g?
Yes

on my box:

Breakpoint 1, gc_zval_possible_root (zv=0x14b13d8, tsrm_ls=0x123d090)
at /home/huixinchen/opensource/php-5.3/Zend/zend_gc.c:132
132 if (UNEXPECTED(GC_G(free_list) != NULL &&
(gdb) p basic_functions_module.zts
$2 = 1 '\001'
(gdb) printzv zv
0x014b13d8 array(1): {
 0 => 0x014b15a0 string(10): "/tmp/1.php"
 }
(gdb) print (zend_compiler_globals *)zv
$3 = (zend_compiler_globals *) 0x14b13d8

Oh I forgot to mention a point, when using backtrace command gdb seems to load all of the symbol,
so you don't run bt command before printzv, it will show up.
it's make no sense at all, (and I didn't run bt, altough it should
have nothing to do with this),

I am not sure what's going wrong with your box, and I really can not
reproduce it. I noticed that in your bug entry, there is a warning:
"warning: Source file is more recent than executable.", please
re-compile your php, and try agian.

thanks

thanks

On Fri, May 4, 2012 at 12:02 PM, Reeze Xia
<reply@reply.github.com (mailto:reply@reply.github.com)>
wrote:

Hi,
I've fill bug ticket #61936 since @pierre we need a tick.
see: https://bugs.php.net/bug.php?id=61936.

since struct _zend_executor_globals is always available so I change it to it.

Thanks。

You can merge this Pull Request by running:

git pull https://github.com/reeze/php-src fix-eg-cg-symbol

Or you can view, comment on it, or merge it online at:

#74

-- Commit Summary --

  • Fixed bug #61936 ____executor_globals fails when EG/CG symbol may not visible in some module

-- File Changes --

M .gdbinit (4)

-- Patch Links --

https://github.com/php/php-src/pull/74.patch
https://github.com/php/php-src/pull/74.diff


Reply to this email directly or view it on GitHub:
#74

Git Pull Requests Mailing List (https://github.com/php)
To unsubscribe, visit: http://www.php.net/unsub.php

Laruence Xinchen Hui
http://www.laruence.com/


Reply to this email directly or view it on GitHub:
#74 (comment)


Reply to this email directly or view it on GitHub:
#74 (comment)

Git Pull Requests Mailing List (https://github.com/php)
To unsubscribe, visit: http://www.php.net/unsub.php

Laruence  Xinchen Hui
http://www.laruence.com/

@php-pulls

Copy link
Copy Markdown

Comment on behalf of laruence at php.net:

bogus, as we disccussed

@php-pulls php-pulls closed this May 8, 2012
php-pulls pushed a commit that referenced this pull request Mar 27, 2013
* PHP-5.5:
  Fixed issue #74 (Allowed per request OPcache disabling)
php-pulls pushed a commit that referenced this pull request Apr 21, 2014
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