PHP + Stream Wrapper + Stream Filter // Reproducer
Reproducer for php/php-src#8219
Usage
Run php index.php
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use Symfony\Component\Console\Output\StreamOutput; | |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
$k = new class('prod', false) extends AppKernel implements CompilerPassInterface { | |
public function process(ContainerBuilder $container) |
watch -n 1 cp -u -R ./source ./dest | |
# Run every seconds: `-n 1` | |
# Copy everything from "source" to "dest": | |
# `-R ./source ./dest` | |
# But only if the content is different `-u` |
#!/bin/bash | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
NOCOLOR='\e[0m' |
<?php | |
const STREAM_OPEN_FOR_INCLUDE = 128; | |
final class HardCoreDebugLogger | |
{ | |
public static function register(string $output = 'php://stdout') | |
{ | |
register_tick_function(function () use ($output) { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
Reproducer for php/php-src#8219
Run php index.php
<?php | |
<<<CONFIG | |
packages: | |
- "symfony/finder: ~3.0" | |
- "symfony/console: ~3.0" | |
CONFIG; | |
use Symfony\Component\Console\Application; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; |
<?php | |
register_tick_function(function() { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | |
$last = reset($bt); | |
$info = sprintf("%s +%d\n", $last['file'], $last['line']); | |
file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND); | |
// or | |
// file_put_contents('php://output', $info, FILE_APPEND); | |
}); |
<?php | |
function m() | |
{ | |
$memory = round(memory_get_usage() / 1024 / 1024, 2); | |
$frame = debug_backtrace(0, 1)[0]; | |
$file = basename($frame['file']); | |
$line = $frame['line']; | |
printf("%s:%d | %sMb\n", $file, $line, $memory); |
TL;DR: There is a bug in gnome that have been fixed in 3.3.
But you can temporary fix this issue with: pkill gsd-media-keys
We check logs
/vendor/ |