PR# 19617 FUNCTION.item crashes in finalized mode

Problem Report Summary
Submitter: gobobe
Category: Compiler
Priority: High
Date: 2020/02/26
Class: Bug
Severity: Serious
Number: 19617
Release: 19.12.10.3842
Confidential: No
Status: Analyzed
Responsible:
Environment: win
Synopsis: FUNCTION.item crashes in finalized mode

Description
The following code works fine in workbench mode, but crashes when calling `action.item` in finalized mode:

~~~~~~~~~~~~~~~
	execute
		local
			b: BOOLEAN
		do
			create values.make (19)
			values.put (2, "gobo")
			action := agent values.item
			b := g
		end

	action: FUNCTION [STRING, INTEGER]

	values: HASH_TABLE [INTEGER, STRING]

	g: BOOLEAN
		do
			Result := action.item (["gobo"]) /= 0
		end
~~~~~~~~~~~~~~~
-------------------------------------------------------------------------------
Class / Object      Routine                Nature of exception           Effect
-------------------------------------------------------------------------------
AA                            root's creation        Segmentation violation:      
<0000024E88181588>                         Operating system signal.      Exit
-------------------------------------------------------------------------------
AA                            root's creation                                     
<0000024E88181588>                         Routine failure.              Exit
-------------------------------------------------------------------------------
~~~~~~~~~~~~~~~

It works fine when I replace the agent creation by:

~~~~~~~~~~~~~~~
action := agent (s: STRING): INTEGER do Result := values.item (s) end
~~~~~~~~~~~~~~~

--
Eric Bezault
To Reproduce

										
Problem Report Interactions
From:alexk_es    Date:2020/02/27    Status: Analyzed    Download   
Added eweasel test#final133.

From:gobobe    Date:2020/02/26    Status: Open    Download   
But it has to be something in FUNCTION rather than in HASH_TABLE, because the same code (belonging to the same region, the root class) crashes in a SCOOP program despite using DS_HASH_TABLE. Again, using an inline agent instead of the straight call to the hash table solves the problem.

--
Eric Bezault

From:gobobe    Date:2020/02/26    Status: Open    Download   
It does not crash when I replace HASH_TABLE by DS_HASH_TABLE.

--
Eric Bezault

From:gobobe    Date:2020/02/26    Status: Open    Download   
I must be doing something wrong because I have the same crash with 19.05.

--
Eric Bezault