Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] ECJ producing broken class file [urgent]

Hi Andrey,

thank you very much for your quick response. Indeed it seems the new ECJ version fixes the problem. Very happy!

Many greetings,
Stefan

On Sat, 30 Oct 2021 at 14:20, Andrey Loskutov <loskutov@xxxxxx> wrote:
Hi,

you can get latest ecj build here:
https://download.eclipse.org/eclipse/downloads/drops4/I20211029-1800/

If the problem is still there, please create a bug for jdt core and attach minimal example to reproduce.

Am 30. Oktober 2021 14:12:28 MESZ schrieb Stefan Reich via jdt-dev <jdt-dev@xxxxxxxxxxx>:
>Hello there, I am using ECJ to produce all my class files and it usually
>works perfectly.
>
>However, I am now seeing it produce a broken class file. I really need to
>resolve this.
>
>Here is the jar containing the broken file loadableUtils/utils.class:
>https://botcompany.de/files/1400532/ecj-anomaly.jar
>
>When run in JDK 17, it gives:
>
>~/dev/the-anomaly$ java -jar ecj-anomaly.jar
>Exception in thread "main" java.lang.ClassFormatError: Duplicate entry in
>InnerClasses attribute in class file loadableUtils/utils
>
>It's a big class file (almost a megabyte), maybe the bug only happens with
>huge classes.
>
>Inspecting utils.class with BCEL, I do find that an entry of the
>InnerClasses attribute is duplicated.
>
>The ECJ version I am using is 4.19 with a slight patch (allowing the var
>keyword at any source level). I am pretty confident the patch is not the
>problem.
>
>In order to test the compilation yourself, you can just extract the jar
>file which includes sources and compile loadableUtils/utils.java having the
>other classes in path.
>
>One more question I have is where to get the latest ECJ version? I got a
>bit confused by the Eclipse website(s). Is 4.19 the latest version?
>
>Final note: I tried to fix the broken class file using BCEL but had some
>problem writing the class file back which ended up truncated.
>
>My current workaround is to use javac.
>
>So I am really looking forward to an ECJ fix.
>
>Many greetings,
>Stefan
>

--
Kind regards,
Andrey Loskutov

https://www.eclipse.org/user/aloskutov
Спасение утопающих - дело рук самих утопающих
_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jdt-dev


--

Back to the top