Skip to content

Instantly share code, notes, and snippets.

View mkrautz's full-sized avatar

Mikkel Krautz mkrautz

View GitHub Profile
foo@foorcore mumble % master % /usr/lib64/qt5/bin/qmake -recursive main.pro CONFIG+="no-embed-qt-translations no-ice no-bonjour"
Reading /home/foo/nobackup/src/mumble/src/mumble_proto/mumble_proto.pro
Reading /home/foo/nobackup/src/mumble/3rdparty/celt-0.7.0-build/celt-0.7.0-build.pro
Reading /home/foo/nobackup/src/mumble/3rdparty/celt-0.11.0-build/celt-0.11.0-build.pro
Reading /home/foo/nobackup/src/mumble/3rdparty/opus-build/opus-build.pro
Reading /home/foo/nobackup/src/mumble/src/mumble/mumble.pro
Reading /home/foo/nobackup/src/mumble/plugins/plugins.pro
Reading /home/foo/nobackup/src/mumble/plugins/link/link.pro
Reading /home/foo/nobackup/src/mumble/plugins/manual/manual.pro
Reading /home/foo/nobackup/src/mumble/overlay_gl/overlay_gl.pro
@mkrautz
mkrautz / example.txt
Created October 3, 2015 19:02
Building Mumble on Debian
$ su root -
Password:
# apt-get build-dep mumble
# exit
$ git clone --recursive https://github.com/mumble-voip/mumble.git
$ cd mumble
$ qmake -recursive main.pro CONFIG+="release no-embed-qt-translations bundled-speex"
$ make
$ ./release/mumble
@mkrautz
mkrautz / ciphertable.c
Last active October 3, 2015 16:43
ciphertable.py
// Automatically generated by "cipherinfo.py". DO NOT EDIT BY HAND.
static const SSLCipherInfo cipher_info_lookup_table[] = {
{
// openssl_name
"AES128-SHA",
// rfc_name
"TLS_RSA_WITH_AES_128_CBC_SHA",
// encryption
"AES_128_CBC",
#!/usr/bin/env python
#
# Copyright (C) 2015, Mikkel Krautz <[email protected]>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
Sampling process 3681 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Mumble (pid 3681) every 1 millisecond
Process: Mumble [3681]
Path: /Applications/Mumble.app/Contents/MacOS/Mumble
Load Address: 0x100000000
Identifier: net.sourceforge.mumble.Mumble
Version: 1.2.8
Code Type: X86-64
Parent Process: ??? [1]
diff --git a/src/mumble/ServerHandler.cpp b/src/mumble/ServerHandler.cpp
index 485c462..1fffa82 100644
--- a/src/mumble/ServerHandler.cpp
+++ b/src/mumble/ServerHandler.cpp
@@ -295,10 +295,12 @@ void ServerHandler::run() {
#if QT_VERSION >= 0x050500
qtsSock->setProtocol(QSsl::TlsV1_0OrLater);
-#elif QT_VERSION == 0x050400
+#elif QT_VERSION >= 0x050400
@mkrautz
mkrautz / windbg.txt
Created January 3, 2015 19:23
Far Cry 4 crash with Mumble x64 overlay
Microsoft (R) Windows Debugger Version 6.3.9600.17029 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [C:\Users\mkrautz\AppData\Local\CrashDumps\FarCry4.exe.7248.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available
Symbol search path is: *** Invalid ***
****************************************************************************
@mkrautz
mkrautz / qt5-qsslsocket-protocol-levlels.patch
Created December 27, 2014 00:12
Qt 5: QSslSocket protocol levels
--- ./qtbase/src/network/ssl/qsslcontext_openssl.cpp
+++ ./qtbase/src/network/ssl/qsslcontext_openssl.cpp
@@ -126,44 +126,24 @@ QSslContext* QSslContext::fromConfigurat
bool reinitialized = false;
bool unsupportedProtocol = false;
init_context:
+ sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
switch (sslContext->sslConfiguration.protocol()) {
case QSsl::SslV2:
-#ifndef OPENSSL_NO_SSL2
@mkrautz
mkrautz / crash.c
Last active August 29, 2015 14:10
MSVC 2013 crasher
// Build with "cl -O2 /fp:fast crash.c"
#include <stdio.h>
#include <stdlib.h>
#define IMIN(a,b) (float)(a>b?a:b)
struct TonalityAnalysis {
int count;
float std[4];
@mkrautz
mkrautz / build.cmd
Last active August 29, 2015 14:09
Opus crash on MSVC 2013.3/2013.4
:: Reproducer for what seems to be a bug in MSVC 2013.3/2013.4.
::
:: The crash triggers when built with /fp:fast (http://msdn.microsoft.com/en-us/library/e7s85ffb.aspx)
:: and -Oi (http://msdn.microsoft.com/en-us/library/f99tchzc.aspx).
::
:: The compiler seems to compile the sqrt assignment loop in
:: https://git.xiph.org/?p=opus.git;a=blob;f=src/analysis.c;h=2ee853376a3e13ddcb1ffaed64f549bf858477bb;hb=HEAD#l497
:: into a series of SIMD operations, one of them being 'sqrtps'.
:: However, the output address of the generated sqrtps instruction
:: is not aligned on a 16-byte boundary. This is what causes the crash.