ASM error in do/while with break

Description

While porting a CFML application I noticed the following is unsupported:

Activity

Show:

Jacob Beers January 14, 2025 at 2:57 PM

thanks, picking this up now.

Brad Wood January 13, 2025 at 8:39 PM

Yes, this appears to simply be an issue with our new ASM direct-to-bytecode compiler. (We have two BoxPilers in BoxLang-- one that transpiles to java source and then compiles via javac, and one that compiles directly to bytecode via ASM). The issue is likely reproduceable in certain situations based on the code around the loop at the time.

I can reproduce your error. It seems to be related to being inside a component and using a break statement. My JUnit test is

where the contents of ASMError.cfc is

assigning this to you. I’m committing the failing (but disabled) test in the ClassTest class.

Jochem van Dieten January 13, 2025 at 7:35 PM

docker ortussolutions/boxlang:miniserver-snapshot with bx-esapi,bx-mysql,bx-ini,bx-unsafe-evaluate if that makes a difference

Jochem van Dieten January 13, 2025 at 6:53 PM
Edited

While trying to get to work I got:

Actual code for the testcase I build to reproduce is the following Application.cfc:

If I replace it with your loop, it works. Maybe some constants get folded in the compiler?

Brad Wood January 13, 2025 at 5:40 PM

Do/while loops are certainly supported and have been since the beginning! Here is one of our passing tests for them, which was added well over a year ago:

And the exact code in this ticket runs fine on try boxlang

Can you explain what you’re seeing when you try to run this?

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created January 12, 2025 at 2:09 PM
Updated January 15, 2025 at 10:47 PM
Resolved January 14, 2025 at 8:25 PM