Skip to content

controlFlowFlattening seems to ignore continue in while or for loop #71

@jpodpro

Description

@jpodpro

i've got a while loop with a condition that calls continue. when controlFlowFlattening is enabled (threshold is at 0.75) the condition is reached but continue does not appear to be called. the lines of code after are called instead of the loop restarting. I have also discovered this happening in a for loop elsewhere in my code.

while (link_it.next())
{
      var pkt = link_it.value.getPacketFrom();
      if (!pkt)
      {
            pkt = link_it.value.getPacketTo();
      }
      if (!pkt)
      {
            console.log('there is no packet');
            continue;
      }

      console.log('packet is', pkt);
      var src = pkt.src;
      var dst = pkt.dst;
}

the console shows:

there is no packet
packet is null

here are my obfuscation options:

    --compact true
    --controlFlowFlattening true
    --controlFlowFlatteningThreshold 0.75
    --deadCodeInjection true
    --deadCodeInjectionThreshold 0.4
    --debugProtection false
    --debugProtectionInterval false
    --disableConsoleOutput false
    --mangle false
    --rotateStringArray true
    --selfDefending true
    --stringArray true
    --stringArrayEncoding 'base64'
    --stringArrayThreshold 0.75
    --unicodeEscapeSequence false

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions