Skip to content

Instantly share code, notes, and snippets.

View swgillespie's full-sized avatar

Sean Gillespie swgillespie

View GitHub Profile
# Copyright 2016-2018, Pulumi Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,

Keybase proof

I hereby claim:

  • I am swgillespie on github.
  • I am swgillespie (https://keybase.io/swgillespie) on keybase.
  • I have a public key whose fingerprint is 9207 E475 CBF2 3929 8E25 9BBC F870 6498 53D0 7FB0

To claim this, I am signing this object:

@swgillespie
swgillespie / env.sh
Created June 7, 2016 18:15
Test crash reproduction for CoreCLR
ulimit -c unlimited
sudo sh -c 'echo "/home/ddcloud/coredumps/core_%e.%p" > /proc/sys/kernel/core_pattern'
export COMPlus_GCLogEnabled=1
export COMPlus_GCLogFile=/home/ddcloud/Documents/gclog/gclog
export COMPlus_GCLogFileSize=1f0
export COMPlus_SOEnableDefaultRWValidation=0
export COMPlus_GCprnLvl=3
export COMPlus_StressLog=1
open Ast
open Sema
type trans_state = {
struct_field_table: (string, Llvm.lltype * (string * int) list) Hashtbl.t;
type_info_table: (string, Llvm.llvalue) Hashtbl.t;
context: Llvm.llcontext;
llvm_mod: Llvm.llmodule;
identifier_map: (string, Llvm.llvalue) Hashtbl.t;
mutable rtti_struct: Llvm.lltype option;
@swgillespie
swgillespie / license_headers.py
Created March 1, 2016 22:12
CoreCLR License Headers
import os
import glob
import sys
correct_header = r'''// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.'''
incorrect_header = r'''// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.'''
@swgillespie
swgillespie / csprojs.py
Created February 29, 2016 19:12
CoreCLR Test Porting Useful Scripts
import os
import shutil
import subprocess
import sys
copyright_notice = r'''// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
'''
@swgillespie
swgillespie / sigtrap
Created December 24, 2015 21:15
Rust sigtrap in destructor
Dump of assembler code for function _ZN36heap..RootedPtr$LT$values..Value$GT$10drop.1528417h0ca5468f4cbeee43E:
0x0000555555616750 <+0>: sub $0x28,%rsp
0x0000555555616754 <+4>: mov 0x20(%rdi),%al
0x0000555555616757 <+7>: cmp $0xd4,%al
0x0000555555616759 <+9>: setne %cl
0x000055555561675c <+12>: cmp $0x1d,%al
0x000055555561675e <+14>: setne %dl
0x0000555555616761 <+17>: and %dl,%cl
0x0000555555616763 <+19>: test $0x1,%cl
0x0000555555616766 <+22>: mov %rdi,0x10(%rsp)
@swgillespie
swgillespie / heap.rs
Created November 14, 2015 05:56
gc heap
//! This module provides the garbage-collected heap that
//! contains any and all ECMAScript objects that are
//! allocated by the runtime.
//!
//! ## Overview
//! The ECMAScript standard does not require a "heap" in the
//! traditional sense, but it is very convenient for an implementation
//! to define a garbage-collected heap from which ECMAScript objects
//! are allocated from. This implementation is no different from
//! other ES implementations in that it provides a garbage-collected
@swgillespie
swgillespie / beta_output.txt
Created October 22, 2015 04:55
nightly_regression
time: 0.020 parsing
time: 0.005 configuration 1
time: 0.000 recursion limit
time: 0.000 gated macro checking
time: 0.000 crate injection
time: 0.007 macro loading
time: 0.000 plugin loading
time: 0.000 plugin registration
time: 0.378 expansion
time: 0.000 complete gated feature checking 1
Prelude> let x = x x
<interactive>:2:9:
Occurs check: cannot construct the infinite type: t1 ~ t -> t1
Relevant bindings include x :: t -> t1 (bound at <interactive>:2:5)
In the expression: x x
In an equation for ‘x’: x = x x
# let rec x = x x;;