Skip to content

Instantly share code, notes, and snippets.

View ice799's full-sized avatar

Joe Damato ice799

  • san francisco, ca
View GitHub Profile
diff --git a/ext/gpgme/gpgme_n.c b/ext/gpgme/gpgme_n.c
index b9f9d6d..06c092a 100644
--- a/ext/gpgme/gpgme_n.c
+++ b/ext/gpgme/gpgme_n.c
@@ -109,6 +109,11 @@
#define UNWRAP_GPGME_TRUST_ITEM(vitem, item) \
Data_Get_Struct(vitem, struct _gpgme_trust_item, item)
+#ifdef HAVE_RUBY_ENCODING_H
+#include <ruby/encoding.h>
diff --git a/test/fixtures/cookbooks/packagecloud_test/recipes/rubygems.rb b/test/fixtures/cookbooks/packagecloud_test/recipes/rubygems.rb
index 6a72864..a2677e2 100644
--- a/test/fixtures/cookbooks/packagecloud_test/recipes/rubygems.rb
+++ b/test/fixtures/cookbooks/packagecloud_test/recipes/rubygems.rb
@@ -1,13 +1,17 @@
-return if platform?('centos') && node['platform_version'].to_i == 5
-
include_recipe 'packagecloud_test::distro_deps'
packagecloud_repo 'computology/packagecloud-cookbook-test-public' do
-----> serverspec installed (version 2.31.1)
/opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -I/tmp/busser/gems/gems/rspec-support-3.4.1/lib:/tmp/busser/gems/gems/rspec-core-3.4.4/lib /opt/chef/embedded/bin/rspec --pattern /tmp/busser/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/busser/suites/serverspec
Command "ls /usr/local/bin/jake"
exit_status
should eq 0 (FAILED - 1)
Command "/usr/local/bin/jake"
exit_status
should eq 0 (FAILED - 2)
/* gcc hi.c -o hi -lcrypto */
#include <stdlib.h>
#include <stdio.h>
#include <openssl/crypto.h>
int
main(int argc, char *argv[])
{
void *(*openssl_malloc)(size_t), (*openssl_free)(void *);
/* machdep.S - machine dependent assembly routines for the GDB stub */
/*
* Copyright (C) 2006 Lubomir Kundrak
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [nprobe.c:3087] Welcome to bprobe v.1.0.0fi772 ($Revision: 1983 $) for x86_64-redhat-linux-gnu
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [nprobe.c:3106] Tracing enabled
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [nprobe.c:4858] There are no bonded interfaces being monitored.
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [plugin.c:133] Loading plugins...
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [plugin.c:142] No plugins found in ./plugins
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [plugin.c:142] No plugins found in /usr/local/lib/bprobe/plugins
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [plugin.c:146] WARNING: Unable to find plugins directory. bProbe will work without plugins!
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [plugin.c:196] 0 plugin(s) loaded [0 delete][0 packet].
Mar 27 14:33:10 sg123 bprobe[83972]: 27/Mar/2012 14:33:10 [nprobe.c:4992] We
@ice799
ice799 / an_bug.S
Created January 3, 2012 20:01
an bug
# can you spot the bug?
#
# if so, boundary is hiring: jobs@boundary.com
#
c03bc00c <atomic64_add_return_cx8>:
c03bc00c: 55 push %ebp
c03bc00d: 53 push %ebx
c03bc00e: 56 push %esi
c03bc00f: 57 push %edi
/* there are bugs in this this is just copy and pasted, but might be a good reference */
static void
dump_registers(void *context)
{
ucontext_t *uc = context;
#if defined(linux)
#if defined(BUILD_ARCH_X86_64)
traceEvent(TRACE_ERROR, "RBP = 0x%0.16lx, RSP = 0x%0.16lx, RIP = 0x%0.16lx",
diff --git a/src/elfcore.c b/src/elfcore.c
index 4304770..598f5dc 100644
--- a/src/elfcore.c
+++ b/src/elfcore.c
@@ -856,13 +856,8 @@ static int CreateElfCore(void *handle,
mappings[i].start_address += zeros;
}
- /* Do not write contents for memory segments that are read-only */
- if ((mappings[i].flags & (PF_ANONYMOUS|PF_W)) == 0) {