ARudik / phc

Automatically exported from code.google.com/p/phc
0 stars 0 forks source link

phc: ./src/lib/Object.h:95: T* dyc(GC_obj*) [with T = HIR::Rvalue]: Assertion `result != __null' failed. #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download ezComponents 2009.2.1 (http://ezcomponents.org/) or use the 
attached file
2. Run phc ezcomponents/Graph/src/interfaces/palette.php
3. See phc crash while parsing the file, apparently while creating the HIR.

What is the expected output? What do you see instead?
There should be no output, however an error message is displayed:

phc: ./src/lib/Object.h:95: T* dyc(GC_obj*) [with T = HIR::Rvalue]: Assertion 
`result != __null' failed.
SIGABRT received!
This could be a bug in phc. If you suspect it is, please email
a bug report to phc-general@phpcompiler.org.

What version of the product are you using? On what operating system?

phc 0.2.0.3 was compiled and run on Debian Lenny 5.0.6.
Linux dev 2.6.26-2-686 #1 SMP Thu Sep 16 19:35:51 UTC 2010 i686 GNU/Linux

Please provide any additional information below.

I tried to compile the newest phc from svn trunk r3391 but that failed with

./.libs/libphc.so: undefined reference to `PHP::get_superglobals()'
./.libs/libphc.so: undefined reference to `PHP::get_string_value(MIR::Literal*)'
(see also http://code.google.com/p/phc/issues/detail?id=119).

Original issue reported on code.google.com by catapuit...@yahoo.de on 26 Oct 2010 at 10:35

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry that trunk didnt work. I just fixed it, so see if it works now.

Original comment by paul.biggar on 26 Oct 2010 at 1:22

GoogleCodeExporter commented 9 years ago
Tested it again with r3395, same problem with the failed assertion.

Original comment by catapuit...@yahoo.de on 29 Oct 2010 at 10:53

GoogleCodeExporter commented 9 years ago
Ok, I've checked it out and reduced it and added it as bug0035.php. Should be 
simple to fix.

Original comment by paul.biggar on 29 Oct 2010 at 12:00

GoogleCodeExporter commented 9 years ago
This is now fixed. What was happening was that shredding (converting the AST to 
3-address code) has become very complicated. There was an annotation aimed at 
expressions like $$a[0]. In our AST, this is very similar to $x->$y[0], where 
the difference is that the latter has a target. Checking for a target fixed it.

BTW, phc doesn't yet support lots of the features in your code, such as magic 
methods.

Does this fix the problem?

Original comment by paul.biggar on 31 Oct 2010 at 11:53

GoogleCodeExporter commented 9 years ago
Yes, thank you, seems to work now.

Original comment by catapuit...@yahoo.de on 22 Nov 2010 at 10:14

GoogleCodeExporter commented 9 years ago

Original comment by paul.biggar on 22 Nov 2010 at 11:46