Euphoria Ticket #94: reusing slices

The code below shows the problem. The lines labeled "STMT A" though "STMT E" are the ones in question. Comment out all except one of them and run the translated program. The application works for STMTs A through D, but not E. In that case, it crashes the application.

function xyzzy(sequence x) 
	return x & x 
end function 
 
procedure foo(sequence bar) 
	object envvar 
	object val 
 
	envvar = bar[1 ..$] 
	--envvar = getenv(bar[1 ..$])    -- STMT A 
	--envvar = getenv(envvar & "")   -- STMT B 
	--val = getenv(envvar)    -- STMT C 
	--envvar = xyxxy(envvar)    -- STMT D 
	envvar = getenv(envvar)    -- STMT E 
end procedure 
 
foo("eudir") 

Details

Type: Bug Report Severity: Major Category: Translator
Assigned To: mattlewis Status: Fixed Reported Release: r2918
Fixed in SVN #: 2921, 2922, 3435 View VCS: 2921, 2922, 3435 Milestone:

1. Comment by mattlewis Oct 10, 2009

This looks like an old bug. Interesting that it wasn't found until now. opGETENV wasn't using CSaveStr correctly.

2. Comment by DerekParnell Oct 10, 2009

Works now.

Search



Quick Links

User menu

Not signed in.

Misc Menu