Skip to content

Instantly share code, notes, and snippets.

🎈

Frank Denis jedisct1

🎈
Block or report user

Report or block jedisct1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View b.c
// Test case for Xcode 11 broken stack alignment
// See https://forums.developer.apple.com/thread/121887
// Compile with `cc -mavx -O2 a.c`
int main(void) {
register char a __asm("rbx") = 0;
char b[5000];
char c[100] = {0};
asm volatile("" : : "r,m"(a), "r,m"(b), "r,m"(c) : "memory");
return 0;
View a.c
// Test case for Xcode 11 broken stack alignment
// See https://forums.developer.apple.com/thread/121887
// Compile with cc -mavx -O2 a.c
#include <fcntl.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
View a.diff
diff --git a/src/write/macho.rs b/src/write/macho.rs
index dbbe5df..48f7b6b 100644
--- a/src/write/macho.rs
+++ b/src/write/macho.rs
@@ -137,6 +137,17 @@ impl Object {
let mut strtab = StringTable::default();
let mut symbol_offsets = vec![SymbolOffsets::default(); self.symbols.len()];
let mut nsyms = 0;
+
+ let prefixed_symbols: Vec<_> = self
@jedisct1
jedisct1 / xcode-11b6.c
Created Aug 26, 2019
Stack alignment bug in Xcode 11 with AVX optimizations
View xcode-11b6.c
#include <fcntl.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
typedef struct {
char d[16];
void *e;
struct { char b[5536]; } f;
View cmake.diff
--- Findsodium.cmake 2019-07-23 22:22:23.000000000 +0200
+++ zok.cmake 2019-07-23 22:22:17.000000000 +0200
@@ -18,7 +18,6 @@
# Once done the following variables will be defined:
#
# sodium_FOUND sodium_INCLUDE_DIR sodium_LIBRARY_DEBUG sodium_LIBRARY_RELEASE
-# sodium_VERSION_STRING
#
# Furthermore an imported "sodium" target is created.
#
@jedisct1
jedisct1 / centos5-docker-dnscrypt-server.sh
Last active Jun 29, 2019
dnscrypt server installation on CentOS 5 (Vultr)
View centos5-docker-dnscrypt-server.sh
#!/bin/sh
yum -y update
# Replace with SERVER="your host name" for a custom host name
SERVER="$(hostname)"
export SERVER
SERVER_IP="$(ip route get 1 | awk '{print $NF;exit}')"
export SERVER_IP
echo "$SERVER"
@jedisct1
jedisct1 / iptables
Created Jun 29, 2019
dnscrypt-proxy iptables firewall rules
View iptables
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -p udp --dport 443 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT
-A INPUT -s 127.0.0.1 -j ACCEPT
View a
___chkstk_darwin
___chkstk_darwin_probe
_argon2_ctx
_argon2_decode_string
_argon2_encode_string
_argon2_fill_memory_blocks
_argon2_fill_segment_avx2
_argon2_fill_segment_avx512f
_argon2_fill_segment_ref
_argon2_fill_segment_ssse3
View a
_PBKDF2_SHA256
_alloc_region
_argon2_ctx
_argon2_hash
_argon2_pick_best_implementation
_argon2_verify
_argon2i_hash_encoded
_argon2i_hash_raw
_argon2i_verify
_argon2id_hash_encoded
View a
_PBKDF2_SHA256
___chkstk_darwin
___chkstk_darwin_probe
_alloc_region
_argon2_ctx
_argon2_hash
_argon2_pick_best_implementation
_argon2_verify
_argon2i_hash_encoded
_argon2i_hash_raw
You can’t perform that action at this time.