Menu

#502 Some instructions may have a side effect

v4.11
closed-fixed
None
6
2014-08-19
2014-03-17
No

DIV, REM, NEWARRAY and ARRAYLENGTH instructions may have a side effect and should be added in SideEffectInstructionChecker class.

Here are some code samples that have side effect but are removed when doing code simplification:

int i = 1 / 0;

int i = 1 % 0;

Object[] o = null;
int i = o.length;

Object[] o = new Object[-1];

Discussion

  • Eric Lafortune

    Eric Lafortune - 2014-04-17

    Thanks for the list of special cases. ProGuard now handles them, with -Doptimize.conservatively, in the upcoming version 5.0 beta1.

     
  • Eric Lafortune

    Eric Lafortune - 2014-04-17
    • status: open --> open-fixed
    • assigned_to: Eric Lafortune
    • Priority: 5 --> 6
     
  • Eric Lafortune

    Eric Lafortune - 2014-08-19
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.