|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2003-02-19 11:36 UTC] peter at alcor dot concordia dot ca
 This code crashes Apache on Tru64 Unix version 5.1A: 
 
<?php 
 
echo htmlspecialchars("That crashes Apache", ENT_QUOTES, 
"ISO-8859-1"); 
 
?> 
 
(dbx) run -X -f /pubmail/apache/conf/httpd.conf 
Unaligned access pid=148971 <httpd> va=0x14009ff7c 
pc=0x1200f6c08 ra=0x120111e90 inst=0xb4290000 
Unaligned access pid=148971 <httpd> va=0x14009ff7c 
pc=0x1200f6c08 ra=0x120111e90 inst=0xb4290000 
Unaligned access pid=148971 <httpd> va=0x11fff965c 
pc=0x1201164c0 ra=0x120116e8c inst=0xb42d0000 
signal Segmentation fault at   [get_next_char:6 
+0xfdc,0x12018a7ec] 
(dbx) 
 
I suspect it's 64-bit cleanness-related. 
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 09:00:01 2025 UTC | 
Surprisingly this fixes the problem: --- html.c.original 2002-12-12 09:52:09.000000000 -0500 +++ html.c 2003-02-25 13:01:05.000000000 -0500 @@ -827,7 +827,8 @@ { char *str, *hint_charset = NULL; int str_len, hint_charset_len = 0; - int len, quote_style = ENT_COMPAT; + int len; + long quote_style = ENT_COMPAT; char *replaced; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls", &str, &str_len,