Skip to content
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

Crash when parsing casted comparison #401

Open
danog opened this issue Mar 9, 2020 · 0 comments
Open

Crash when parsing casted comparison #401

danog opened this issue Mar 9, 2020 · 0 comments
Labels

Comments

@danog
Copy link

danog commented Mar 9, 2020

Code:

<?php

$a = 0;
$b = 1;

var_dump((string) $a === (string) $b);

Result:

[daniil@daniil-arch jav]$ jppm start
-> linux
-> app:run 
-> install 
java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    $php_module_m92fb06560cc04edabf397866fa04be32.__include(Lphp/runtime/env/Environment;[Lphp/runtime/Memory;Lphp/runtime/memory/ArrayMemory;)Lphp/runtime/Memory; @97: invokevirtual
  Reason:
    Type 'php/runtime/Memory' (current frame, stack[2]) is not assignable to 'java/lang/String'
  Current Frame:
    bci: @97
    flags: { }
    locals: { 'php/runtime/env/Environment', '[Lphp/runtime/Memory;', 'php/runtime/memory/ArrayMemory', 'php/runtime/memory/ArrayMemory', 'php/runtime/Memory', 'php/runtime/Memory' }
    stack: { 'php/runtime/env/Environment', 'java/lang/String', 'php/runtime/Memory' }
  Bytecode:
    0x0000000: 2cb8 002b 4e2d 122d b600 333a 042d 1235
    0x0000010: b600 333a 052a b200 3703 322d b600 3d2a
    0x0000020: b200 3704 322d b600 3d19 04b2 003f 0332
    0x0000030: b600 4357 2ab2 0037 0532 2db6 003d 1905
    0x0000040: b200 3f04 32b6 0043 572a b200 3706 322d
    0x0000050: b600 3d2a 1904 b600 4719 05b6 0047 b800
    0x0000060: 4cb6 0050 b800 5501 b800 5b57 b200 5fb0
    0x0000070:                                        

        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.getDeclaredMethod(Class.java:2128)
        at php.runtime.loader.RuntimeClassLoader.loadModule(RuntimeClassLoader.java:139)
        at php.runtime.env.CompileScope.loadModule(CompileScope.java:599)
        at php.runtime.env.CompileScope.loadModule(CompileScope.java:603)
        at php.runtime.env.Environment.importModule(Environment.java:1253)
        at php.runtime.env.ConcurrentEnvironment.importModule(ConcurrentEnvironment.java:175)
        at php.runtime.env.ModuleManager.fetchTemporaryModule(ModuleManager.java:71)
        at php.runtime.env.ModuleManager.fetchModule(ModuleManager.java:41)
        at php.runtime.env.ModuleManager.fetchModule(ModuleManager.java:27)
        at php.runtime.launcher.Launcher.loadFrom(Launcher.java:121)
        at php.runtime.launcher.Launcher.run(Launcher.java:308)
        at php.runtime.launcher.Launcher.run(Launcher.java:247)
        at php.runtime.launcher.Launcher.run(Launcher.java:243)
        at php.runtime.launcher.Launcher.main(Launcher.java:425)

@dim-s dim-s added the bug label Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants