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
; ModuleID = '1' | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-macosx10.9.0" | |
@.str = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 | |
; Function Attrs: nounwind ssp uwtable | |
define i32 @main(i32 %argc, i8** %argv) #0 { | |
%1 = alloca i32, align 4 | |
%2 = alloca i32, align 4 |
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 (c) 2014 Plausible Labs Cooperative, Inc. | |
* All rights reserved. | |
*/ | |
#import "PLCryptoConstantTime.h" | |
/** | |
* @ingroup plcrypto | |
* @{ |
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
diff --git a/Source/PLCrashAsyncMachOImage.c b/Source/PLCrashAsyncMachOImage.c | |
index 56f5866..bf58524 100644 | |
--- a/Source/PLCrashAsyncMachOImage.c | |
+++ b/Source/PLCrashAsyncMachOImage.c | |
@@ -303,6 +303,21 @@ void *plcrash_async_macho_next_command (plcrash_async_macho_t *image, void *prev | |
/* Advance to the next command */ | |
uint32_t cmdsize = image->byteorder->swap32(cmd->cmdsize); | |
+ | |
+ /* Sanity check the cmdsize */ |
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
/** | |
* @internal | |
* | |
* Create a Codec instance for VDEFileItem records. | |
*/ | |
static Codec<VDEFileItem> fileItemCodec () { | |
using namespace codecs; | |
const auto varLengthBytes = eager(variableSizeBytes(uint32L, identityBytes)); |
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 (c) 2015 Plausible Labs Cooperative, Inc. | |
* All rights reserved. | |
*/ | |
#pragma once | |
#include <functional> | |
#include <type_traits> | |
#include <limits> |
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
# DYLD_LIBRARY_PATH library variables break linking of standard system libraries by forcing dyld to ignore | |
# everything but the library's basename when performing what would otherwise be successful library | |
# resolution. | |
mkdir rust-lib | |
echo 'void my_libjpeg_api (void) { }' | clang -dynamiclib -x objective-c -o rust-lib/libjpeg.dylib - | |
echo 'extern void my_libjpeg_api(void); int main (int argc, char *argv[]) { my_libjpeg_api(); return 0; }' | clang -x objective-c -o example - -framework ImageIO -Lrust-lib -ljpeg | |
env DYLD_LIBRARY_PATH=`pwd`/rust-lib ./example | |
#dyld: Library not loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib | |
# Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO |
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
// Decoding and encoding of the entire file format | |
/** | |
* @internal | |
* | |
* Create a Codec instance for VDEFileItem structures. | |
*/ | |
static Codec<VDEFileItem> fileItemCodec() { | |
using namespace codecs; | |
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
using namespace codecs; | |
/* Define a set of codecs for encoding/decoding VoodooPad's encrypted document header */ | |
auto versionCodec = ( | |
// `|' associates an arbitrary string context with a codec; this is used | |
// for error reporting, providing additional information on parse errors. | |
("record_compat_version" | codecs::uint8 ) & | |
("record_feature_version" | codecs::uint8 ) | |
).as<VDERecordVersion>(); |
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
/* | |
* Minimal compatibility shims to support existing tests written against the SenTestCase (aka OCUnit) API. This | |
* allows us to support Apple's new XCTest framework without polluting existing test cases with spurious changes. | |
* | |
* The APIs are nearly identical, and can be aliased directly. | |
*/ | |
#import <XCTest/XCTest.h> | |
@compatibility_alias SenTestCase XCTestCase; |
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
@interface SeqTests : XCTestCase @end | |
@implementation SeqTests | |
/* Construction examples */ | |
- (void) testConstruction { | |
} | |
/* Some example uses */ |