This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2026 Michael Grunder. | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions | |
| * are met: | |
| * 1. Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. | |
| * 2. Redistributions in binary form must reproduce the above copyright |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Reproduce a stale map pointer in ck_rhs_fas after Robin Hood relocation | |
| * grows the table. | |
| * | |
| * There are three useful outcomes: | |
| * | |
| * 1. Unpatched master loses a key before ck_rhs_fas can reach the growth | |
| * path, demonstrating the pre-existing Robin Hood probe-depth bug. | |
| * 2. With only the probe-depth fix, ck_rhs_fas reaches the growth path and | |
| * loses the replacement by restarting with a pointer to the retired map. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Standalone reproducer for a ck_rhs probe-bound corruption. It expects the | |
| * usual ck_rhs configuration where an 8-bit atomic stores the probe bound. | |
| * | |
| * Build from a configured ck checkout with: | |
| * cc -std=c99 -O2 -Iinclude ck_rhs_probe_bound_reproducer.c \ | |
| * src/ck_rhs.c -o ck_rhs_probe_bound_reproducer | |
| * Or just: | |
| * cc -O2 -g3 ck_rhs_probe_bound_reproducer.c -lck -o ck_rhs_probe_reproducer | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function export_redis(RedisClient $redis, string $targetPath): array | |
| { | |
| ensureDir(dirname($targetPath)); | |
| $handle = fopen($targetPath, 'wb'); | |
| if ($handle === false) { | |
| throw new RuntimeException("Unable to write Redis export: {$targetPath}"); | |
| } | |
| $types = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Storage: /var/lib/systemd/coredump/core.php.1000.dc4d8d901afc458882fef3a2cb5a2225.16488.1767373281000000.zst (present) | |
| Size on Disk: 1.2M | |
| Message: Process 16488 (php) of user 1000 dumped core. | |
| Module libgomp.so.1 from deb gcc-14-14.2.0-4ubuntu2~24.04.amd64 | |
| Module libzstd.so.1 from deb libzstd-1.5.5+dfsg2-2build1.1.amd64 | |
| Module libgcc_s.so.1 from deb gcc-14-14.2.0-4ubuntu2~24.04.amd64 | |
| Module libstdc++.so.6 from deb gcc-14-14.2.0-4ubuntu2~24.04.amd64 | |
| Stack trace of thread 16488: | |
| #0 0x00007a68c5b50ce9 relayIncrSharedStats (relay.so + 0xe3ce9) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:latest | |
| RUN apt-get update && apt-get install -y \ | |
| php-cli \ | |
| php-dev \ | |
| php-pear \ | |
| gcc \ | |
| make \ | |
| redis \ | |
| openssl \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:22.04 | |
| ENV PHP_VERSION=8.4.0alpha1 | |
| ENV PHPREDIS_VERSION=develop | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| wget \ | |
| curl \ | |
| libxml2-dev \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function accCommandCounts(array &$acc, array $stats) { | |
| $re_cmd = '/cmdstat_([a-zA-Z]+)\|?([a-zA-Z]*)/'; | |
| $re_num = '/^calls=(\d+).*/'; | |
| foreach ($stats as $cmd => $info) { | |
| if ( ! preg_match($re_cmd, $cmd, $matches)) | |
| die("Malformed command name\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <time.h> | |
| #include <sys/time.h> | |
| #include <locale.h> | |
| #define MAX_DIGITS 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Compile with: cc -Wall -ggdb3 -o hiredis-binary-example hiredis-binary-example.c -lhiredis | |
| #include <stdio.h> | |
| #include <hiredis/hiredis.h> | |
| #include <stddef.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| struct binaryData { | |
| char *str; |
NewerOlder