Coder Social home page Coder Social logo

Comments (2)

penberg avatar penberg commented on June 12, 2024

The -Xtrace:trampoline switch shows that we end up in:

[main] jit_magic_trampoline: ret0=0x41e7fea3, ret1=0x41e82ef4: java/util/zip/InflaterDynHeader.decode #2

which has an infinite loop:

public boolean decode(StreamManipulator input) throws DataFormatException
{
decode_loop:
  for (;;)
    {

Given that peekBits and dropBits from StreamManipulator are involved, my first guess is that it's a 32-bit vs 64-bit issue (possibly so that the higher 32-bits are not zeroed properly).

from jato.

penberg avatar penberg commented on June 12, 2024

The problem is definitely related to 32-bit vs 64-bit issues. The following patch "fixes" the busy loop problem:

diff --git a/arch/x86/insn-selector_64.brg b/arch/x86/insn-selector_64.brg
index ce75c52..dc8d9fa 100644
--- a/arch/x86/insn-selector_64.brg
+++ b/arch/x86/insn-selector_64.brg
@@ -2275,7 +2275,7 @@ emulate_op_64(struct _MBState *state, struct basic_block *s,
        struct var_info *eax;

        eax = get_fixed_var(s->b_parent, MACH_REG_xAX);
-       state->reg1 = get_var(s->b_parent, J_INT);
+       state->reg1 = get_var(s->b_parent, J_LONG);

        rsi = get_fixed_var(s->b_parent, MACH_REG_RSI);
        select_insn(s, tree, reg_reg_insn(INSN_MOV_REG_REG, state->right->reg1, rsi));

but it breaks ControlTransferTest. A quick look reveals various potential places where we mix up 32-bit and 64-bit registers.

from jato.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.