php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22090 Segmentation fault when build as extension
Submitted: 2003-02-06 05:26 UTC Modified: 2003-02-08 08:49 UTC
From: tilman dot giese at gmx dot de Assigned:
Status: Not a bug Package: Recode related
PHP Version: 4.3.0 OS: SuSE Linux 8.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tilman dot giese at gmx dot de
New email:
PHP Version: OS:

 

 [2003-02-06 05:26 UTC] tilman dot giese at gmx dot de
I recently compiled PHP with recode support (Version 3.6) without any problems. But when I compile it as a shared extension, Apache (2.0.44) fails on startup with a segmentation fault shortly after loading librecode. Strace shows the following:

gettimeofday({1044530175, 187698}, NULL) = 0
time(NULL)                              = 1044530175
open("/usr/lib/php/extensions/no-debug-non-zts-20020429/recode.so", O_RDONLY) = 15
read(15, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\f\0"..., 1024) = 1024
fstat64(15, {st_mode=S_IFREG|0755, st_size=10374, ...}) = 0
old_mmap(NULL, 10108, PROT_READ|PROT_EXEC, MAP_PRIVATE, 15, 0) = 0x4309d000
mprotect(0x4309f000, 1916, PROT_NONE)   = 0
old_mmap(0x4309f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 15, 0x1000) = 0x4309f000
close(15)                               = 0
open("/etc/ld.so.cache", O_RDONLY)      = 15
fstat64(15, {st_mode=S_IFREG|0644, st_size=58193, ...}) = 0
old_mmap(NULL, 58193, PROT_READ, MAP_PRIVATE, 15, 0) = 0x4355e000
close(15)                               = 0
open("/usr/lib/librecode.so.0", O_RDONLY) = 15
read(15, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320/\3"..., 1024) = 1024
fstat64(15, {st_mode=S_IFREG|0755, st_size=1331931, ...}) = 0
old_mmap(NULL, 1279084, PROT_READ|PROT_EXEC, MAP_PRIVATE, 15, 0) = 0x435d0000
mprotect(0x436db000, 185452, PROT_NONE) = 0
old_mmap(0x436db000, 188416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 15, 0x10b000) = 0x436db000
close(15)                               = 0
munmap(0x4355e000, 58193)               = 0
brk(0x821e000)                          = 0x821e000
--- SIGSEGV (Segmentation fault) ---

Unfortunately I can't give you more information because debugging apache via gdb results in a mysterios infinite loop.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-06 10:11 UTC] sniper@php.net
Please read this page:

  http://www.php.net/manual/en/ref.recode.php

And especially the "Warning" boxes..
Furthermore, you didn't tell how you configured PHP
and are you running Apache2 with the 'worker' MPM?

 [2003-02-08 06:33 UTC] tilman dot giese at gmx dot de
Sorry, I must have overlooked this passage in the documentation. Now it works quite well.
 [2003-02-08 08:49 UTC] sniper@php.net
rtfm error. :)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 08:01:28 2024 UTC