Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38250 invoked from network); 11 Apr 2012 23:28:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Apr 2012 23:28:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=luke@cywh.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=luke@cywh.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cywh.com from 209.85.160.42 cause and error) X-PHP-List-Original-Sender: luke@cywh.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:48259] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/C8-23245-9A3168F4 for ; Wed, 11 Apr 2012 19:28:41 -0400 Received: by pbcun1 with SMTP id un1so2003686pbc.29 for ; Wed, 11 Apr 2012 16:28:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=user-agent:date:subject:from:to:message-id:thread-topic :mime-version:content-type:x-gm-message-state; bh=AKSbdop11aQHnujYqI0qwv+QUTdDVl4KVp8xq5ei2Tc=; b=nUW9SD9tuSTU68lQBv3ZlsrplxKZo3Sfd2lZG+2EYFvCw5r0p49pDh8NIV/V1+8Imc AcEaJtuAyFebELWxadO64j5ZrJfTG8sc0L9rxiSSWa5F66bnKaKfLhBuZ6sWpTwRXY2u Sw3P5DGFK/V0igkkRsVsXNW/TOBadX8qsnr7X9I4KvsZeTDWu2howxcLds5XxxiEgtLe NrEcmxldPGHqxV3jjgXxpqkiGzJYJ1YXCgQmdNpz7rqerRBnSBLuVpXHSfCwWTkf646G pVzFlgbiCAR+kSh9nMOECtvykN9/HmsDszt47Jrgq6kmZbvOIfFY58COBEaPJHZ9JMOa o+8Q== Received: by 10.68.211.1 with SMTP id my1mr1733920pbc.29.1334186918610; Wed, 11 Apr 2012 16:28:38 -0700 (PDT) Received: from [10.1.10.222] ([66.60.139.106]) by mx.google.com with ESMTPS id qu5sm4124077pbc.45.2012.04.11.16.28.37 (version=SSLv3 cipher=OTHER); Wed, 11 Apr 2012 16:28:38 -0700 (PDT) User-Agent: Microsoft-MacOutlook/14.13.0.110805 Date: Wed, 11 Apr 2012 16:30:23 -0700 To: Message-ID: Thread-Topic: Seg fault with custom extension on dlclose Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3417006626_4764698" X-Gm-Message-State: ALoCoQmQuwbHapvnQidO++ytQ/zlCiLNZjM0foS84Y5t/xHFfJZakSms3OV0Qvf1+sX5945NA3A+ Subject: Seg fault with custom extension on dlclose From: luke@cywh.com (Luke Scott) --B_3417006626_4764698 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit I'm writing an extension that uses Google's V8 engine. I'm getting a segfault after my module has been unloaded. Here is what I get when running PHP: DYLD_PRINT_LIBRARIES_POST_LAUNCH=1 /phpdev/bin/php -f /Server/www/localhost/test.php dyld: loaded: /phpdev/lib/php/extensions/debug-zts-20090626/v8php.so dyld: loaded: /phpdev/lib/libv8.dylib string(11) "Hello World" dyld: unloaded: /phpdev/lib/php/extensions/debug-zts-20090626/v8php.so dyld: unloaded: /phpdev/lib/libv8.dylib Segmentation fault (core dumped) This is the stack trace of the core dump: #0 0x00007fff5fc1face in __dyld_munmap () #1 0x00007fff5fc10e8c in __dyld__ZN23ImageLoaderMachOClassicD0Ev () #2 0x00007fff5fc04bad in __dyld__ZN4dyld20garbageCollectImagesEv () #3 0x00007fff5fc09e9a in __dyld_dlclose () #4 0x00007fff83133665 in dlclose () #5 0x00000001005baa8c in module_destructor (module=0x100d52c10) at zend_API.c:2138 #6 0x00000001005c6927 in zend_hash_apply_deleter (ht=0x100a748e0, p=0x100d52bc0) at zend_hash.c:612 #7 0x00000001005c6b38 in zend_hash_graceful_reverse_destroy (ht=0x100a748e0) at zend_hash.c:647 #8 0x00000001005aa6e4 in zend_shutdown (tsrm_ls=0x100d000f0) at zend.c:759 #9 0x00000001004e9935 in php_module_shutdown (tsrm_ls=0x100d000f0) at main.c:2186 #10 0x000000010071bb0e in main (argc=3, argv=0x7fff5fbffa30) at php_cli.c:1377 Here is the test PHP code: $v8 = new V8(); var_dump($v8->run("'Hello World'")); The "run" function is almost identical to the second snippet on this page: https://developers.google.com/v8/get_started , difference being I'm doing RETURN_STRING(*ascii, 1). (If providing a core dump helps, I can do that as well) Anyone know what could be causing this? Luke --B_3417006626_4764698--