Skip to content

Commit

Permalink
work around a segfault in ext-phalcon/3.4.3
Browse files Browse the repository at this point in the history
It crashes with PHP 7.3.6: phalcon/cphalcon#14160

No ETA on a new release from upstream, so we rebuild by hand with the Zephir fixes before compiling.
  • Loading branch information
dzuelke committed Jun 13, 2019
1 parent 0c9085d commit 6296034
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
### FIX

- Bug in Apache 2.4.39 (https://bz.apache.org/bugzilla/show_bug.cgi?id=63325) causes 408 timeout after 20 seconds on long file uploads (#342) [David Zuelke]
- Phalcon 3.4.3 segfaults on latest PHP 7.3.6 [David Zuelke]

## v156 (2019-05-30)

Expand Down
28 changes: 28 additions & 0 deletions support/build/extensions/no-debug-non-zts-20121212/phalcon
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,34 @@ else
workdir=php${series:0:1}/64bits
fi
pushd ${dep_dirname}

# 3.4.3 requires an updated Zephir with fixes, otherwise PHP 7.3.6+ will segfault: https://github.com/phalcon/cphalcon/issues/14160
if dpkg --compare-versions "$dep_version" "le" 3.4.3; then
# first, install zephir parser...
git clone https://github.com/phalcon/php-zephir-parser
pushd php-zephir-parser
phpize
./configure --prefix=${OUT_PREFIX}
make -s -j9
make install -s
# ... and load as extension
echo "extension=zephir_parser.so" >> ${OUT_PREFIX}/etc/php/conf.d/zehpir.ini
popd
# zephir itself...
git clone https://github.com/phalcon/zephir
pushd zephir
git checkout 0.10.x
# can just be installed into $(cwd)/bin
./install-nosudo
popd
# this regenerates what we really need: ext/kernel/ with the changes
zephir/bin/zephir generate --backend=ZendEngine3
# regenerate the build/ dir
php build/gen-build.php
# generating phalcon without phalcon installed only produces a safe/ build dir, so override it from earlier
workdir=php${series:0:1}/safe
fi

pushd build
pushd ${workdir}
export CC="gcc"
Expand Down

0 comments on commit 6296034

Please sign in to comment.