PR# 16369 Strange errors when calling features of COMPARABLE on INTEGERs

Problem Report Summary
Submitter: juliant
Category: Runtime
Priority: Medium
Date: 2009/10/20
Class: Bug
Severity: Critical
Number: 16369
Release: 6.5.8.945
Confidential: No
Status: Analyzed
Responsible:
Environment: Kubuntu x86
Synopsis: Strange errors when calling features of COMPARABLE on INTEGERs

Description
When you call features of COMPARABLE directly on INTEGERs (directly meaning without using the infix aliases), then there are can occur two errors:

1. Precondition "other /= Void" failing, although a value is passed and the type of 'other' is expanded (the type of the argument in the debugger says "detachable INTEGER")

2. Segmentation fault
To Reproduce
Run the following class, uncomment either one of the two lines in feature make two produce the errors:

class
	APPLICATION

create
	make

feature {NONE} -- Initialization

	make
			-- Run application.
		local
			i: INTEGER
			b: BOOLEAN
		do
--			b := i.is_greater_equal (0) -- Precondition violation (other /= Void)
			f (0) -- Segmentation fault in 'i.is_greater_equal'
		end

	f (i: INTEGER)
		require
			i.is_greater_equal (0)
		do

		end

end
Problem Report Interactions
From:juliant    Date:2009/10/21    Download   
The line with the segmentation fault works correctly in finalized mode.

The precondition violation happens also in finalized mode (keeping assertions when finalizing).

From:manus_eiffel    Date:2009/10/21    Status: Analyzed    Download   
Could you tell me if finalized the code works properly?