Euphoria Ticket #150: Forward calls to function without assigning causes crash

When a function is called as a forward reference, but the value isn't assigned, the program crashes:

fwd_assign() 
function fwd_assign() 
    return 1 
end function 

Details

Type: Bug Report Severity: Normal Category: Interpreter
Assigned To: mattlewis Status: Fixed Reported Release: 3147
Fixed in SVN #: 3156, 3148 View VCS: 3156, 3148 Milestone:

1. Comment by mattlewis Apr 10, 2010

Added test in tests/t_fwd.e in svn:3148.

2. Comment by mattlewis Apr 11, 2010

Fixed the forward reference code and removed previous "bad" test that assumed this didn't work.

3. Comment by jimcbrown Apr 11, 2010

You mean that you added a new, corrected and improved, test to ensure that this bug is caught if it recurrs in the future?

Or did you just remove the test? Why?

4. Comment by mattlewis Apr 11, 2010

I added a test that was meant to pass to t_fwd.e. I removed t_c_fwd_bad.e (or whatever it actually was) that I suspect was put in there before a function return result could be ignored. Once I corrected the forward referencing bug, that test wasn't crashing, and was therefore a failure.

Basically, I just moved that test to the right place.

Search



Quick Links

User menu

Not signed in.

Misc Menu