Euphoria Ticket #226: function with if statement and no return crashes

A function with no return causes a machine-level exception crash instead of a nice error message.

function tester( integer i ) 
	if i = 0 then 
		?i 
	else 
		?i 
		return 1 
	end if 
end function 
 
?tester( 0 ) 

Details

Type: Bug Report Severity: Major Category: Interpreter
Assigned To: mattlewis Status: Fixed Reported Release: 3484
Fixed in SVN #: 3499 View VCS: 3499 Milestone:

1. Comment by mattlewis Oct 11, 2010

This appears to be an inlining problem.

2. Comment by mattlewis Oct 11, 2010

We were removing BADRETURNFs from functions and procedures. When a goto target was aiming at the BADRETURNF, removing it would change the goto to a bad address, causing a machine crash.

Search



Quick Links

User menu

Not signed in.

Misc Menu