Skip to content

Instantly share code, notes, and snippets.

View NattyNarwhal's full-sized avatar
🐪
ML stands for metalanguage, not machine learning

Calvin Buckley NattyNarwhal

🐪
ML stands for metalanguage, not machine learning
View GitHub Profile
MCS [basic] System.Security.dll
../../../external/corefx/src/Common/src/System/Security/Cryptography/AsnReader.cs(294,21): warning CS0219: The variable `tag' is assigned but its value is never used
../../../external/corefx/src/Common/src/System/Security/Cryptography/AsnReader.cs(317,21): warning CS0219: The variable `tag' is assigned but its value is never used
Unhandled Exception:
Mono.CSharp.InternalErrorException: ../../../external/corefx/src/Common/src/System/Security/Cryptography/AsnWriter.cs(1171,22): System.Security.Cryptography.Asn1.AsnWriter.WriteGeneralizedTimeCore(System.Security.Cryptography.Asn1.Asn1Tag, System.DateTimeOffset, bool) ---> Mono.CSharp.InternalErrorException: ../../../external/corefx/src/Common/src/System/Security/Cryptography/AsnWriter.cs(1172,9): ---> System.OverflowException: Value was either too large or too small for an Int32.
at System.Decimal.ToInt32 (System.Decimal d) [0x00035] in <b639830f9571483488f2a4773dd396f1>:0
at System.Decimal.op_Explicit (System.Decimal val
MCS [basic] mscorlib.dll
../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs(231,22): warning CS0219: The variable `modified' is assigned but its value is never used
../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs(240,18): warning CS0219: The variable `modified' is assigned but its value is never used
../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs(950,21): warning CS0219: The variable `i' is assigned but its value is never used
../../../external/corefx/src/Common/src/CoreLib/System/Number.Formatting.cs(2125,17): warning CS0219: The variable `i' is assigned but its value is never used
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs(70,22): warning CS0219: The variable `localManager' is assigned but its value is never used
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs(89,22): warning CS0219: The var
$ ./configure
checking for C compiler... cc
checking for -w compiler flag... yes
checking for OS... NEXTSTEP
checking for __dead... no
checking for __dead2... no
checking for asprintf... no
checking for confstr... no
checking for pledge... no
checking for reallocarray... no
@NattyNarwhal
NattyNarwhal / congruent.c
Created July 26, 2018 19:52
mntctl/statfs congruency
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/mntctl.h>
#include <sys/vmount.h>
#include <sys/statfs.h>
int main(void) {
int needsize, ret;
(gdb) x/24x 0x10000398
0x10000398 <main+56>: 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x61
0x100003a0 <main+64>: 0x80 0x01 0x00 0x01 0x00 0x00 0x00 0x38
0x100003a8 <main+72>: 0x00 0x04 0x6d 0x61 0x69 0x6e 0x1f 0x00
(gdb) x/24c 0x10000398
0x10000398 <main+56>: 0 '▒' 0 '▒' 0 '▒' 0 '▒' 0 '▒' 0 '▒' 32 ' ' 97 'a'
0x100003a0 <main+64>: -128 '▒' 1 '▒' 0 '▒' 1 '▒' 0 '▒' 0 '▒' 0 '▒' 56 '8'
0x100003a8 <main+72>: 0 '▒' 4 '▒' 109 'm' 97 'a' 105 'i' 110 'n' 31 '▒' 0 '▒'
https://www.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.alangref/idalangref_traceback_tags.htm
@NattyNarwhal
NattyNarwhal / patch.diff
Last active April 5, 2019 18:01
svr4 soname patch (WIP)

Static mono binary:

CONFIG_SHELL=`which bash` ./autogen.sh  --with-aix-soname=svr4 --enable-shared  --with-static_mono=yes --prefix=/opt/mono

Non-static mono binary:

OBJECT_MODE=64 CONFIG_SHELL=`which bash` LDFLAGS="-Wl,-bnoquiet" ./autogen.sh --with-aix-soname=svr4 --enable-shared --with-static_mono=no --disable-static --prefix=/opt/mono
int getsign (register int x) {
register int z;
/* it would be nice not to have to clobber the input, but isel doesn't like r0 */
asm (
"cmpi 0, 0, %2, 0\n"
"addi %2, 0, -1\n"
"isel %0, %2, %0, 0\n" // lt
"addi %2, 0, 1\n"
"isel %0, %2, %0, 1\n" // gt
"addi %2, 0, 0\n"
# shutdown
SHUTDOWN PROGRAM
Thu Jul 18 16:51:22 EDT 2019
Broadcast message from root@aix.autocoder.local (tty) at 16:51:22 ...
shutdown: PLEASE LOG OFF NOW !!!
All processes will be killed in 1 minute.
@NattyNarwhal
NattyNarwhal / loadaddr.c
Created July 22, 2019 16:17
AIX dladdr?
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>
#include <sys/errno.h>
#include <stdlib.h>
/* AIX specific headers for loadquery and traceback structure */
#include <sys/ldr.h>
#include <sys/debug.h>
diff --git a/mdoc/Mono.Documentation/Updater/DocUtils.cs b/mdoc/Mono.Documentation/Updater/DocUtils.cs
index b0ea1a1..a10ed6e 100644
--- a/mdoc/Mono.Documentation/Updater/DocUtils.cs
+++ b/mdoc/Mono.Documentation/Updater/DocUtils.cs
@@ -291,8 +291,8 @@ namespace Mono.Documentation.Updater
{
bool IEqualityComparer<TypeReference>.Equals (TypeReference x, TypeReference y)
{
- if (x is null && y is null) return true;
- if (x is null || y is null) return false;