PR# 18023 Nested tuple with expanded type causes undetected VEVI error
Problem Report Summary
Submitter: prestoat2000
Category: Compiler
Priority: Medium
Date: 2011/11/29
Class: Bug
Severity: Serious
Number: 18023
Release: 7.0.88046
Confidential: No
Status: Analyzed
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9.0.10) Gecko/2009042715 Firefox/3.0.10
Solaris 10 on x86
Synopsis: Nested tuple with expanded type causes undetected VEVI error
Description
The following should be a VEVI error but the compiler reports no error and execution results in a call on Void target in a void-safe system: expanded class TEST2 end local t: TUPLE [c: TUPLE [x: TEST2]] do create t print (t.c.generating_type); io.new_line end Added test attach095 for this bug.
To Reproduce
Run test attach095. Compiler does not report a vEVI error. Execute system. Gets a call on Void target.
Problem Report Interactions
This is not a compiler error but a library error as `default_create' should not be a valid creation procedure for TUPLE. The reason it is still present is that we have too much code relying on it to avoid catcall at runtime with agents and the routine {ROUTINE}.empty_operands. It is the same kind of issue we have with `make' from ARRAY that is not void-safe. So the expected output for the test should be VGCC as `default_create' is not available for creation of a TUPLE. Until we have a fix for all the above, we will have to live with this flaw which is quite limited. I'll raise this in our internal language discussion.
An expanded type in the tuple is not required. The following also gets a call on Void target (no VEVI error): class TEST2 end (Note: not expanded) value: TEST2 local t: TUPLE [c: TUPLE [x: TEST2]] do create t t.c.x := create {TEST2} create Result end