Skip to content

Instantly share code, notes, and snippets.

View chriswailes's full-sized avatar

Chris Wailes chriswailes

View GitHub Profile
@chriswailes
chriswailes / gist:7374121
Created November 8, 2013 17:00
Error message from `git svn dcommit`
Committing to http://svn.code.sf.net/p//code/trunk ...
ERROR from SVN:
URL access forbidden for unknown reason: Access to '/p/chapel/code/!svn/me' forbidden
W: 05cce810ea190016cfbf010cf3ae4a65a48d3dc0 and refs/remotes/trunk differ, using rebase:
:040000 040000 f09de67b4ac43c434a41fdc411996dd41a048a7e a163882d878563c75d45913fb0dffd29d9eb1d2b M util
Current branch master is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.
(CallExpr .v
(SymExpr 'chpl__followIdx:(_ref(real(64)),_ref(int(64)))')
(SymExpr 'x2:_ref(int(64))')))
@chriswailes
chriswailes / pagesize.c
Created March 11, 2016 20:46
Calculate the size of a memory page on your system.
#define _GNU_SOURCE
#include <signal.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <ucontext.h>
volatile int done;
@chriswailes
chriswailes / error.txt
Created April 21, 2016 16:40
LLD Build Failure
[1558/1647] Linking CXX shared library lib/liblldReaderWriter.so
FAILED: : && /usr/local/bin/clang++ -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-z,defs -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,liblldReaderWriter.so -o lib/liblldReaderWriter.so tools/lld/lib/ReaderWriter/CMakeFiles/lldReaderWriter.dir/CoreLinkingContext.cpp.o tools/lld/lib/ReaderWriter/CMakeFiles/lldReaderWriter.dir/FileArchive.cpp.o tools/lld/lib/ReaderWriter/CMakeFiles/lldReaderWriter.dir/LinkerScript.cpp.o lib/liblldCore.so lib/liblldYAML.so lib/libLLVMObject.so lib/libLLVMSupport.so -Wl,-rpath,"\$ORIGIN/../lib" && :
tools/lld/lib/ReaderWriter/CMakeFiles/lldReaderWriter.dir/FileArchive.cpp.o:../../tools/lld/lib/ReaderWriter/FileArchive.cpp:function std::thread::thread<lld
@chriswailes
chriswailes / cmake_command.txt
Created April 21, 2016 17:46
LLVM CMake Invocation
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=On -DLINK_POLLY_INTO_TOOLS=On -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_TOOL_COMPILER_RT_BUILD=On -DLLVM_TOOL_LLVM_GO_BUILD=Off -DLLVM_TOOL_XCODE_TOOLCHAIN_BUILD=Off -DLLVM_BINUTILS_INCDIR=/usr/include -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=Off -DLLVM_TOOL_LLD_BUILD=On -DLLVM_TOOL_LLDB_BUILD=Off ../../
@chriswailes
chriswailes / sumOfMembers.cpp
Created June 22, 2016 21:01
An example usage of the points-to-member access operator in C++
#include <iostream>
#include <vector>
template <typename MemberType0, typename MemberType1>
struct S {
MemberType0 m0;
MemberType1 m1;
S(MemberType0 arg_m0, MemberType1 arg_m1) : m0(arg_m0), m1(arg_m1) {}
};