[RPL/2] Internal gcc bug

BERTRAND Joel joel.bertrand at systella.fr
Jeu 6 Aou 12:48:56 CEST 2009


	Hello,

	I'm trying to fix a major bug in SPAWN and STOP/WFPROC intrinsics.

	SPAWN creates a new thread.
	STOP sends a stop signal to specific thread or process.
	WFPROC waits for thread or process termination.

	Sometimes, WFPROC enters in deadlock after STOP signal. I have seen 
some thread and heap memory corruptions. This bug was reproductible on 
sparc and amd64 with gcc-4.3.3. This bug only appears when RPL/2 is 
built with -O3. I have never seen it with the same release of gcc and 
-O2. Problem : with -O3, all programs run better.

	After a long investigation, I'm pretty sure that this bug comes from 
gcc itself. gcc has some bugs with 'volatile' statement. I have tried to 
rebuild RPL/2 from scratch with gcc-4.4.x and gfortran-4.4.x on both 
sparc and amd64. I'm not able to reproduce it.

	Thus, I have modified configure.in script to search gcc-4.4 and 
gfortran-4.4. If not, gcc and gfortran are used and configure script 
makes some tests to find gcc/gfortran versions and limit optimizations 
to -O2 if their versions are older than 4.4.

	Regards,

	JKB


Plus d'informations sur la liste de diffusion RPL2