Euphoria Ticket #557: Translated xor between sequences can lead to crash

The following code causes a crash when translated:

procedure xor_test() 
	sequence x = {0, 1, 2, 3, 4, 5} 
	sequence y = {1, 0, 1, 1, 0, 0} 
    
	if not equal(x xor y, y xor x) then 
		test_fail("sanity basic sequence xor test") 
	end if 
	if compare({{1,1,0,0,1,1}}, {x} xor {y}) != 0 then 
		test_fail("sanity comparison sequence xor test") 
	end if 
end procedure 
xor_test() 

Found in sanity.ex, added to t_sequence.e

Details

Type: Bug Report Severity: Normal Category: Translator
Assigned To: mattlewis Status: Fixed Reported Release:
Fixed in SVN #: 4723 View VCS: 4723 Milestone: 4.0.0

1. Comment by mattlewis Dec 17, 2010

The value of XOR had gotten out of sync with be_runtime.c when two ops were removed, causing the translator to use the wrong binary_op().

Search



Quick Links

User menu

Not signed in.

Misc Menu