Skip to content

Instantly share code, notes, and snippets.

diff --git a/hphp/runtime/base/execution-context.cpp b/hphp/runtime/base/execution-context.cpp
index f61160c..ecf0a41 100644
--- a/hphp/runtime/base/execution-context.cpp
+++ b/hphp/runtime/base/execution-context.cpp
@@ -54,6 +54,8 @@ int64_t VMExecutionContext::s_threadIdxCounter = 0;
Mutex VMExecutionContext::s_threadIdxLock;
hphp_hash_map<pid_t, int64_t> VMExecutionContext::s_threadIdxMap;
+const StaticString s_dot(".");
+
test/slow/ext_string/ext_string.php
--- test/slow/ext_string/ext_string.php.expectf 2014-02-20 16:52:52.140332980 -0800
+++ test/slow/ext_string/ext_string.php.out 2014-02-20 16:55:00.164812815 -0800
@@ -100,20 +100,20 @@
ooooord."
string(52) "I'll &quot;walk&quot; the &lt;b&gt;dog&lt;/b&gt; now"
string(30) "I'll "walk" the <b>dog</b> now"
-string(4) "c2a0"
+string(2) "a0"
string(4) "c2a0"
--- test/slow/ext_string/ext_string.php.expectf 2014-02-20 17:06:16.508817407 -0800
+++ test/slow/ext_string/ext_string.php.out 2014-02-20 17:08:04.533109939 -0800
@@ -112,8 +112,8 @@
string(36) "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"
string(46) "A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;"
string(0) ""
-string(6) "&nbsp;"
-string(6) "&nbsp;"
+string(2) " "
+string(2) " "
static std::string ini_get_save_handler(void *p) {
- return PS(mod)->getName();
+ auto &mod = PS(mod);
+ if (!mod) {
+ return "";
+ }
+ return mod->getName();
}
From 810e4b11822df901a4a8169c0c26a6a29e1e92e5 Mon Sep 17 00:00:00 2001
From: Tim Starling <[email protected]>
Date: Fri, 14 Mar 2014 09:33:52 +1100
Subject: [PATCH] EZC: Implement TSRM globals
Summary:
* Implement TSRM globals properly, i.e. have different globals for
different threads.
* Enable the ZTS macro. This is generally used by Zend extensions to
know if they need to be thread-safe, so for HHVM best answer is yes,
diff --git i/hphp/runtime/base/program-functions.cpp w/hphp/runtime/base/program-functions.cpp
index 392e1cc..ecc22a0 100644
--- i/hphp/runtime/base/program-functions.cpp
+++ w/hphp/runtime/base/program-functions.cpp
@@ -1149,6 +1149,11 @@ static int execute_program_impl(int argc, char** argv) {
Logger::Verbose("Using default config file: %s", default_config_file);
po.config.push_back(default_config_file);
}
+ auto default_config_file = "/etc/hhvm/config.hdf";
+ if (access(default_config_file, R_OK) != -1) {
Breakpoint 2, mprotect () at ../sysdeps/unix/syscall-template.S:81
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
(gdb) bt
#0 mprotect () at ../sysdeps/unix/syscall-template.S:81
#1 0x0000000007f9d319 in HPHP::CodeCache::unprotect (this=0x7ffff0deae00) at hphp/util/code-cache.cpp:184
#2 0x0000000006d839e8 in HPHP::JIT::Lease::acquire (this=0xe5b87e0 <HPHP::JIT::Translator::s_writeLease>, blocking=false) at hphp/runtime/vm/jit/write-lease.cpp:94
#3 0x0000000006d83ba7 in HPHP::JIT::LeaseHolderBase::LeaseHolderBase (this=0x7fffffffbbe0, l=..., acquire=HPHP::JIT::ACQUIRE) at hphp/runtime/vm/jit/write-lease.cpp:129
#4 0x00000000067d38e3 in HPHP::JIT::LeaseHolder::LeaseHolder (this=0x7fffffffbbe0, l=...) at ./hphp/runtime/vm/jit/write-lease.h:101
#5 0x0000000006d2d119 in HPHP::JIT::MCGenerator::createTranslation (this=0x7ffff0deae00, args=...) at hphp/runtime/vm/jit/mc-generator.cpp:425
#6 0x0000000006d2cae6 in HPHP::JIT::MCGenerator::getTranslation (this=0x7ffff0deae00, args=...) at hphp/run
ptarjan@ubuntu:/tmp/fcgiquery$ vendor/bin/heroku-hhvm-apache2
Booting on port 29994...
Using HHVM configuration (php.ini) file 'vendor/heroku/heroku-buildpack-php/conf/hhvm/php.ini'
Using Apache2 VirtualHost-level configuration include 'vendor/heroku/heroku-buildpack-php/conf/apache2/default_include.conf'
Using Apache2 configuration file 'vendor/heroku/heroku-buildpack-php/conf/apache2/heroku.conf'
Starting log redirection...
Starting hhvm...
Starting httpd...
[Mon Jun 09 23:48:05.003027 2014] [core:warn] [pid 61864] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Mon Jun 09 23:48:05.003169 2014] [core:warn] [pid 61864] AH00111: Config variable ${APACHE_RUN_USER} is not defined
ptarjan@ubuntu:/tmp/fcgiquery$ vendor/bin/heroku-hhvm-apache2
Booting on port 14412...
Using HHVM configuration (php.ini) file 'vendor/heroku/heroku-buildpack-php/conf/hhvm/php.ini'
Using Apache2 VirtualHost-level configuration include 'vendor/heroku/heroku-buildpack-php/conf/apache2/default_include.conf'
Using Apache2 configuration file 'vendor/heroku/heroku-buildpack-php/conf/apache2/heroku.conf'
Starting log redirection...
Starting hhvm...
Starting httpd...
Process exited unexpectedly: * Starting web server apache2
Going down, terminating child processes...
ptarjan@ubuntu:/tmp/fcgiquery$ sudo vendor/bin/heroku-hhvm-apache2
Booting on port 9460...
Using HHVM configuration (php.ini) file 'vendor/heroku/heroku-buildpack-php/conf/hhvm/php.ini'
Using Apache2 VirtualHost-level configuration include 'vendor/heroku/heroku-buildpack-php/conf/apache2/default_include.conf'
Using Apache2 configuration file 'vendor/heroku/heroku-buildpack-php/conf/apache2/heroku.conf'
Starting log redirection...
Starting hhvm...
Starting httpd...
Process exited unexpectedly: * Starting web server apache2
Going down, terminating child processes...