Skip to content

Instantly share code, notes, and snippets.

View haesbaert's full-sized avatar

Christiano Haesbaert haesbaert

View GitHub Profile
@haesbaert
haesbaert / result
Created June 11, 2024 10:01
All kernel offsets
amzn/2-4.14.101-91.76.amzn2.x86_64: OK
amzn/2-4.14.104-95.84.amzn2.x86_64: OK
amzn/2-4.14.106-97.85.amzn2.x86_64: OK
amzn/2-4.14.109-99.92.amzn2.x86_64: OK
amzn/2-4.14.114-103.97.amzn2.x86_64: OK
amzn/2-4.14.114-105.126.amzn2.x86_64: OK
amzn/2-4.14.121-109.96.amzn2.x86_64: OK
amzn/2-4.14.123-111.109.amzn2.x86_64: OK
amzn/2-4.14.128-112.105.amzn2.x86_64: OK
amzn/2-4.14.133-113.105.amzn2.x86_64: OK
#include <err.h>
#include <fcntl.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
;;;; Load paths ;;;;
(require 'package)
;(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
;(package-initialize)
;(set-face-bold 'bold nil)
[@@@alert "-unstable"] (* my fucking god *)
open Oslo4
let port = 18624
let print_mtx = Mutex.create ()
type stats = {
conn_total : int Atomic.t;
conn_active : int Atomic.t;
open Oslo3
exception Fdleak
module U = struct
let with_leak_checker (f : unit -> unit) () =
let fetch () =
let l = List.init 512 (fun _ -> Unix.(socket PF_UNIX SOCK_STREAM 0)) in
List.iter Unix.close l;
l
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Copyright 2022 Christiano Haesbaert *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Copyright 2022 Christiano Haesbaert *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
type 'a t = {
count : int Atomic.t;
data : 'a;
}
let make a =
{ count = Atomic.make 1; data = a }
--- /d/ocaml/otherlibs/unix/getaddrinfo.c 2022-07-06 00:03:07.244921517 +0200
+++ lib_eio_linux/getaddrinfo_stubs.c 2022-12-01 18:46:51.464740970 +0100
@@ -2,10 +2,11 @@
/* */
/* OCaml */
/* */
-/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
-/* */
+/* Xavier Leroy, projet Cristal, INRIA Rocquencourt, */
+/* Christiano Haesbaert, Tarides */
#include <liburing.h>
#include <err.h>
#include <stdio.h>
#include <string.h> /* bzero(3) */
#include <unistd.h>
int
pipe_bug(int blocking)
{