jphp icon indicating copy to clipboard operation
jphp copied to clipboard

Crash while parsing a specific comparison

Open danog opened this issue 5 years ago • 1 comments

Code:

<?php

$arr = 0;

!$arr instanceof WhiteLine & !$arr instanceof Comment;

Result:

[daniil@daniil-arch jav]$ jppm start
-> linux
-> app:run 
-> install 
java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    $php_module_m280a2ebf524b45a8bdae8a92ce639f8b.__include(Lphp/runtime/env/Environment;[Lphp/runtime/Memory;Lphp/runtime/memory/ArrayMemory;)Lphp/runtime/Memory; @87: invokevirtual
  Reason:
    Type 'php/runtime/Memory' (current frame, stack[1]) is not assignable to integer
  Current Frame:
    bci: @87
    flags: { }
    locals: { 'php/runtime/env/Environment', '[Lphp/runtime/Memory;', 'php/runtime/memory/ArrayMemory', 'php/runtime/memory/ArrayMemory', 'php/runtime/Memory' }
    stack: { integer, 'php/runtime/Memory' }
  Bytecode:
    0x0000000: 2cb8 002b 4e2d 122d b600 333a 042a b200
    0x0000010: 3503 322d b600 3b2a b200 3504 322d b600
    0x0000020: 3b19 04b2 003d 0332 b600 4157 2ab2 0035
    0x0000030: 0532 2db6 003b 1904 1243 1245 b600 49b8
    0x0000040: 004f b600 5319 0412 5512 57b6 0049 b800
    0x0000050: 4fb6 0053 b800 4fb6 005a 57b2 005e b0  

        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)

danog avatar Mar 09 '20 16:03 danog

Actually just !$hashesMatch & !$patternMatch works

danog avatar Mar 09 '20 18:03 danog