Skip to content

Commit

Permalink
Test #540
Browse files Browse the repository at this point in the history
  • Loading branch information
bobthecow committed Dec 10, 2018
1 parent bc6ba38 commit 3aa42df
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
32 changes: 2 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,15 @@ sudo: false
matrix:
include:
- php: 5.4
- php: 5.4
env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: hhvm
dist: trusty
allow_failures:
- php: 5.4
env: 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'
- php: hhvm
fast_finish: true

install:
- travis_retry composer update --no-interaction $COMPOSER_FLAGS
- php -r 'version_compare(PHP_VERSION, "7.1", "<") || exit(1);' && composer bin phpunit update || true
- "true"

script:
- make test
- "[[ $TRAVIS_PHP_VERSION = 7.2* ]] && make build -j 4 || true"

after_success:
- bash <(curl -s https://codecov.io/bash)

before_deploy: make dist -j 4

deploy:
provider: releases
api_key:
secure: LL8koDM1xDqzF9t0URHvmMPyWjojyd4PeZ7IW7XYgyvD6n1H6GYrVAeKCh5wfUKFbwHoa9s5AAn6pLzra00bODVkPTmUH+FSMWz9JKLw9ODAn8HvN7C+IooxmeClGHFZc0TfHfya8/D1E9C1iXtGGEoE/GqtaYq/z0C1DLpO0OU=
file_glob: true
file: dist/psysh-*.tar.gz
skip_cleanup: true
on:
tags: true
repo: bobthecow/psysh
condition: $TRAVIS_PHP_VERSION = 7.2*
- php preg_segfault.php
17 changes: 17 additions & 0 deletions preg_segfault.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

if (preg_match('/./', 'a')) echo "pre-fork works\n";

$pid = pcntl_fork();
if ($pid == -1) {
die('fail');
} elseif ($pid) {
if (preg_match('/./', 'a')) echo "parent works\n";
pcntl_wait($status);
if (pcntl_wifsignaled($status) && pcntl_wtermsig($status) == SIGSEGV) {
echo "child process segfaulted\n";
exit(1);
}
} else {
if (preg_match('/./', 'a')) echo "child works\n";
}

0 comments on commit 3aa42df

Please sign in to comment.