Re: [PHP-DEV] Reentrant C scanners for PHP
On Thu, 5 Jul 2001, Jason Greene wrote: Sascha, This looks good. Is this going to be brought into php, or is it going to remain a separate project? There is a concrete need for this system, so I'll push for the inclusion of those scanners into PHP. Because the code is still in sort of alpha state (after one and a half day of development), this will be completely optional initially. Making it available through the usual PHP snapshots/releases will broaden the userbase, so that we get a reasonable amount of feedback which helps us to improve the system. - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Reentrant C scanners for PHP
On Fri, Jul 06, 2001 at 01:08:03AM +0200, Sascha Schumann wrote: This is the first public release of fully reentrant C scanners for the PHP language and the INI system. They can be used to replace the Flex-based implementations commonly found in the Zend Engine. Features: - Flexible I/O model; lays groundwork for fully supporting modern web-servers such as Apache 2.0; - uses portable C only; significantly improves portability by removing dependence on GNU extensions of C++; - fully thread-safe without loss of speed. The software is currently available in the form of three source files and a patch to the Zend Engine. where are the .re2c files? tc -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Reentrant C scanners for PHP
Because software already exists to eliminate the scan/parse process, speed was not a main concern. The new language scanner is faster than the old one in all tested scenarios though. ;) This is so Sascha! Looks very nice. Do you think you could LGPL it instead of GPL? Would be tricky to use in conjunction with the QPL if it was GPL'ed. This script: This is a test ? $a = 1; $b = 'Hello'; $c = $a $b; echo $a.$b.$c.\n; ? And this is the last line generates this overrun: --- cgi_main.c(793) : Block 0x0835D7E8 status: Beginning: Overrun (magic=0x082F9BB8, expected=0x7312F8DC) End: Unknown --- And if I repeat the above code 1 times in a file, I get a segfault: Program received signal SIGSEGV, Segmentation fault. 0x081439d4 in _efree (ptr=0x835d80c, __zend_filename=0x824a0c6 cgi_main.c, __zend_lineno=793, __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:212 212 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size); (gdb) bt #0 0x081439d4 in _efree (ptr=0x835d80c, __zend_filename=0x824a0c6 cgi_main.c, __zend_lineno=793, __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:212 #1 0x08078958 in main (argc=2, argv=0xb9c4) at cgi_main.c:793 #2 0x4040c177 in __libc_start_main (main=0x8077efc main, argc=2, ubp_av=0xb9c4, init=0x8075914 _init, fini=0x8249cc0 _fini, rtld_fini=0x4000e184 _dl_fini, stack_end=0xb9bc) at ../sysdeps/generic/libc-start.c:129 -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Reentrant C scanners for PHP
Looks very nice. Do you think you could LGPL it instead of GPL? Would be tricky to use in conjunction with the QPL if it was GPL'ed. As it's my intention that the code is linked against PHP/the Zend Engine, the GPL should be fine here (similar to the situation of the GPLed KDE project and the QPLed QT 1). Anyway, the license is subject to change. Ok, but we still have a bit of work to do to make the Apache/PHP license GPL-compatible. Perhaps by the time ngscan is ready this GPL-compatibility issues will have worked themselves out and the GPL would be fine for ngscan. Leave it GPL'ed and we will wait and see what happens. Can you give http://schumann.cx/ngscan-0.2.tar.gz a try? The example works fine here, regardless of the number of iterations. Backquotes are supported now, too. No, I still get a segfault: Program received signal SIGSEGV, Segmentation fault. 0x081439d4 in _efree (ptr=0x835d7ac, __zend_filename=0x8249f46 cgi_main.c, __zend_lineno=793, __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:212 212 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size); (gdb) bt #0 0x081439d4 in _efree (ptr=0x835d7ac, __zend_filename=0x8249f46 cgi_main.c, __zend_lineno=793, __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:212 #1 0x08078958 in main (argc=2, argv=0xb9c4) at cgi_main.c:793 #2 0x4040c177 in __libc_start_main (main=0x8077efc main, argc=2, ubp_av=0xb9c4, init=0x8075914 _init, fini=0x8249b40 _fini, rtld_fini=0x4000e184 _dl_fini, stack_end=0xb9bc) at ../sysdeps/generic/libc-start.c:129 I will send you the exact script causing it (offline) -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Reentrant C scanners for PHP
This is the first public release of fully reentrant C scanners for the PHP language and the INI system. They can be used to replace the Flex-based implementations commonly found in the Zend Engine. Features: - Flexible I/O model; lays groundwork for fully supporting modern web-servers such as Apache 2.0; - uses portable C only; significantly improves portability by removing dependence on GNU extensions of C++; - fully thread-safe without loss of speed. The software is currently available in the form of three source files and a patch to the Zend Engine. http://schumann.cx/ngscan-0.1.tar.gz To install, cd into the ngscan directory and run make ZEND=../php4/Zend install, followed by a buildconf. Because software already exists to eliminate the scan/parse process, speed was not a main concern. The new language scanner is faster than the old one in all tested scenarios though. time savedlines what 10%500K ? echo test ? 15%500K ? echo test ? 40%1.5M pure HTML -500K ZTS, ? echo test ? (1) 87%500K ZTS, ? echo test ? 99%1.5M ZTS, pure HTML (2) (1) crashed in vprintf, apparently some glibc/pthread issue (2) +4 minutes vs 800 milli-seconds (user times taken from a command-line CGI, CFLAGS=-O, --enable-inline-optimization, gcc 2.95.3, Linux 2.4.6, glibc 2.2.3) - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Reentrant C scanners for PHP
Sascha, This looks good. Is this going to be brought into php, or is it going to remain a separate project? Thanks, Jason - Original Message - From: Sascha Schumann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 6:08 PM Subject: [PHP-DEV] Reentrant C scanners for PHP This is the first public release of fully reentrant C scanners for the PHP language and the INI system. They can be used to replace the Flex-based implementations commonly found in the Zend Engine. Features: - Flexible I/O model; lays groundwork for fully supporting modern web-servers such as Apache 2.0; - uses portable C only; significantly improves portability by removing dependence on GNU extensions of C++; - fully thread-safe without loss of speed. The software is currently available in the form of three source files and a patch to the Zend Engine. http://schumann.cx/ngscan-0.1.tar.gz To install, cd into the ngscan directory and run make ZEND=../php4/Zend install, followed by a buildconf. Because software already exists to eliminate the scan/parse process, speed was not a main concern. The new language scanner is faster than the old one in all tested scenarios though. time savedlines what 10%500K ? echo test ? 15%500K ? echo test ? 40%1.5M pure HTML -500K ZTS, ? echo test ? (1) 87%500K ZTS, ? echo test ? 99%1.5M ZTS, pure HTML (2) (1) crashed in vprintf, apparently some glibc/pthread issue (2) +4 minutes vs 800 milli-seconds (user times taken from a command-line CGI, CFLAGS=-O, --enable-inline-optimization, gcc 2.95.3, Linux 2.4.6, glibc 2.2.3) - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]