|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-11 13:15 UTC] alahaye at fm2i dot com
Description:
------------
Segmentation fault on Apache when using simple script (generaly with functions like header, error_reporting, etc...
Reproduce code:
---------------
<?php
error_reporting(E_ALL);
?>
<?php
error_reporting(E_ALL);
session_start();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
session_cache_expire(32000);
....
?>
Expected result:
----------------
script running :-)
Actual result:
--------------
Export of GDB :
(gdb) run -X
Program received signal SIGSEGV, Segmentation fault
si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
0x2000000076ee3340:0 in _zval_ptr_dtor (zval_ptr=0x7fffce50) at zend.h:403
403 return --pz->refcount__gc;
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
With Snaps during compilation: ============================== "/websuite/build/php5.3/ext/standard/dns.c", line 501: warning #4212-mismatch between character pointer types "u_char *" and "const char *" add_next_index_stringl(entries, cp + ll + 1, n, 1); ^ "/websuite/build/php5.3/ext/standard/dns.c", line 507: warning #4212-D: mismatch between character pointer types "u_char *" and "char *" add_assoc_stringl(*subarray, "txt", tp, dlen - 1 , 0); ^ "/websuite/build/php5.3/ext/standard/dns.c", line 813: error #2136: struct "__res_state" has no field "res_h_errno" if (php_dns_errno(handle) == NO_DATA) { ^ "/websuite/build/php5.3/ext/standard/dns.c", line 940: warning #4232-D: conversion from "u_char (*)[8192]" to a more strictly aligned type "HEADER *" may cause misaligned access hp = (HEADER *)&ans; ^ 1 error detected in the compilation of "/websuite/build/php5.3/ext/standard/dns. c". *** Error exit code 1Hi, here the structure in /usr/lib/resolv.h Version of file is * @(#)B.11.31_LRresolv.h 8.1 (Berkeley) 6/2/93 * $Id: resolv.h,v 8.10 1996/11/18 09:08:49 vixie Exp $ No field "res_h_errno" struct __res_state { int retrans; /* retransmition time interval */ int retry; /* number of times to retransmit */ unsigned int options; /* option flags - see below. */ int nscount; /* number of name servers */ #ifdef IPV6 union { struct sockaddr_in6 *nsaddr_list6; struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ } nsaddr_list; #define nsaddr nsaddr_list.nsaddr_list[0] /* for backward compatibility */ #else struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ #define nsaddr nsaddr_list[0] #endif u_short id; /* current message id */ char defdname[256]; /* default domain (deprecated) */ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ unsigned int pfcode; /* RES_PRF_ flags - see below. */ u_char ndots:4; /* threshold for initial abs. query */ u_char nsort:4; /* number of elements in sort_list[] */ char unused[3]; #ifdef IPV6 union { struct in6_addr *sort_list6; struct { struct in_addr addr; uint32_t mask; } sort_list[MAXRESOLVSORT]; } sort_list; #else struct { struct in_addr addr; uint32_t mask; } sort_list[MAXRESOLVSORT]; #endif } ;The compilation issue in dns.c also occurs under IRIX 6.5.30: cc-1565 c99: ERROR File = /opt/build/php-5.3.1RC1/ext/standard/dns.c, Line = 813 The struct "__res_state" has no field "res_h_errno". if (php_dns_errno(handle) == NO_DATA) { ^ 1 error detected in the compilation of "/opt/build/php- 5.3.1RC1/ext/standard/dns.c".