#625 Wrong code generated when MyClass.super.method()

v5.3
open-fixed
None
5
2016-12-18
2016-10-26
No

This is a regression of version 5.3.1, it worked in 5.3.

When using a anonymous inner class + super.method(), for example:

    public void doSomething() {
        new Runnable() {
            public void run() {
                MyClass.super.doSomething();
            }
        }.run();
    }

Proguard generated code uses "this" instead of "super", resulting in an infinite recursive invocation in this case.

I tried to create a reproducer project (attached, see README), but unfortunately it does not reproduce the bug. So I guess the conditions to raise the issue are a bit more complicated than this, but maybe this is enough for you to understand what could happen here...

1 Attachments

Discussion

  • Eric Lafortune

    Eric Lafortune - 2016-10-26

    ProGuard 5.3.1 only changed the performance of the configuration parsing, compared to 5.3 Could you double-check the version numbers?

     
  • Julien Nicoulaud

    Indeed, I got the wersions wrong, it worked in ProGuard 5.2.1 and was broken by Proguard 5.3.

     
  • Miłosz Lewandowski

    What's the status of this one? I'm experiencing the same problem, but also couldn't reproduce it with smaller project.

     
  • T. Neidhart

    T. Neidhart - 2016-11-30

    I managed to create a reproducible test case (see attached proguard-bug2.tar.gz).

    Additionally, I attached a patch to fix the issue.

     
  • Eric Lafortune

    Eric Lafortune - 2016-12-18

    This problem should be solved in ProGuard update 5.3.2.

     
  • Eric Lafortune

    Eric Lafortune - 2016-12-18
    • status: open --> open-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks