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
Use standard boolean type as zend_bool typedef #5624
Conversation
1ead3d8
to
815d573
Compare
Legit test failures in extensions: DOM:
Fixed in: 706d4f3 JIT build is still broken in regards to type declarations and GC:
All of these fail with a Segmentation faults (Termsig=11) except Fixed in: 13909e5 |
5656643
to
64a79f0
Compare
17aa3ed
to
1d90ab6
Compare
@dstogov can you have a look, or point me in the direction where to look, in regards to the JIT related segfaults? From what I seemed to have understood there is a NULL pointer which gets passed around when it is trying to do some type checks, Nikita had cursory look and didn't find any obvious misuse of Also the backtraces aren't that great as they look like this (this one in particular I got by using Program received signal SIGSEGV, Segmentation fault.
0x000000007fffffff in ?? ()
(gdb) bt
#0 0x000000007fffffff in ?? ()
#1 0x00000000086ce138 in ?? ()
#2 0x00007ffffb25b200 in ?? ()
#3 0x00007ffffffea2f0 in ?? ()
#4 0x00007ffffb215020 in ?? ()
#5 0x800000000002b614 in ?? ()
#6 0x00000000fb25b2e0 in ?? ()
#7 0x0000000000000000 in ?? () |
1d90ab6
to
a0b2e6d
Compare
@Girgias I have fixed the problem in master. |
a0b2e6d
to
4001545
Compare
Now that the segfaults are fixed I would just like an opinion on the way I deal with the error output stream, any better way comes to mind to someone? |
@Girgias Wouldn't just converting display_errors to zend_uchar work? |
Zend/zend_globals.h
Outdated
@@ -81,7 +81,8 @@ struct _zend_compiler_globals { | |||
|
|||
HashTable *auto_globals; | |||
|
|||
zend_bool parse_error; | |||
/* Refer to zend_yytnamerr() in zend_language_parser.y for meaning of values */ | |||
unsigned int parse_error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zend_uchar would be enough here.
It would, just felt weird that the error output stream is bundled with the fact that displaying errors is toggled by the same variable, but that just may be me, will change it to zend_uchar |
4001545
to
f6133b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining test failure is unrelated. Please commit the parse_error/display_errors fixes separately from the typedef change.
As we are now using C99 and
bool
is always defined in thestdbool.h
header, make zend_bool a typedef of a standard boolean.This catches some funky usages of
zend_bool
which I still have trouble debugging.Things which need to be handled/fixed:
[]
for nested lists (fails withFatal error: Cannot mix [] and list()
:I.e.
[$a, [$b]] = array(new stdclass, array(new stdclass));
See
Zend/tests/list_001.phpt
(orZend/tests/list/list_reference_001.phpt
andZend/tests/list/list_reference_009.phpt
Fixed by: baa2858