Impact of CFLAGS on GOTO and SWITCH executers

From: Date: Sun, 15 Oct 2006 12:41:38 +0000
Subject: Impact of CFLAGS on GOTO and SWITCH executers
Groups: php.internals 
Request: Send a blank email to internals+get-26061@lists.php.net to get a copy of this message
Today I built PHP 4.4.4, PHP 5.0.5, PHP 5.1.6, and current PHP_5_2 (the last two each with CALL, GOTO, and SWITCH VMs) with GCC 3.4.6 and GCC 4.1.1 with -O{0|1|2|3|s} [1]. CFLAGS: -march=pentium-m -msse3 -O{0|1|2|3|s} -pipe configure options: --disable-cgi --disable-all I let each of the resulting binaries run the PHP_5_2/Zend/bench.php script (five times). I noticed that for the following configurations the running of the bench.php script results in a segmentation fault: GCC 3.4.6 PHP 5.1.6 GOTO: -O1 SWITCH: -O1 PHP_5_2 GOTO: -O0, -O1, -O2, -O3, -Os SWITCH: -O0, -O1, -O2, -O3, -Os GCC 4.1.1 PHP 5.1.6 GOTO: -O0 SWITCH: -O0 PHP_5_2 GOTO: -O0, -O1, -O2, -O3 SWITCH: -O0, -O1, -O2, -O3 What strikes me as odd are the segmentation faults when PHP is built with -O0 (no optimizations). These results also beg the question how well supported/tested the two alternative executers, GOTO and SWITCH, are. -- [1] Yes, these means I build 80 PHP binaries. -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

« previous php.internals (#26061) next »