PR# 14807 Check violation: eif GC synchronized

Problem Report Summary
Submitter: randyjohn
Category: Runtime
Priority: Medium
Date: 2008/09/19
Class: Bug
Severity: Serious
Number: 14807
Release: 6.3.7.4554
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; WOW64; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648)
Synopsis: Check violation: eif GC synchronized

Description
While running a 64-bit threaded program with a run-time built with USE_ISE_ASSERTIONS I got the following 2 errors.

Check violation: eif GC synchronized
        in file .\eif_threads.c at line 268:
        (eif_is_synchronized())

Precondition violation: eif GC synchronized
        in file .\eif_threads.c at line 232:
        (eif_is_synchronized())

The first violation occurs when the calling thread has set itself to EIF_THREAD_RUNNING, so in fact, the calling thread is the culprit who is not synchronized.

This is reproducible by compiling the two classes below and following these rather strict instructions.

1. Build a run-time with USE_ISE_ASSERTIONS (I may have upped the revision level a bit).
2. Set the breakpoint as shown in the code.
3. Run to the breakpoint.
4. Switch to the other thread (which should be in 'eif_sleep').
5. Switch to a different object on the call stack (just try 'em all).

Other than printing an error message, I don't actually see that any harm is being done.

Randy

To Reproduce
class ROOT

inherit
	MEMORY
	THREAD

create
	make

feature

	make is
	local
		l_local: GEN_CLASS[STRING, STRING]
	do
		launch
		create l_local
		l_local.doit
	end

	execute is
	do
		do_nothing		-- Put a breakpoint here.
	end

end

class
	GEN_CLASS[G, H]

inherit
	THREAD_CONTROL

feature
	doit is
	do
		from

		until
			False
		loop
			sleep(500000)
		end
	end

	g: G

	h: H

end
Problem Report Interactions