Skip to content

Instantly share code, notes, and snippets.

@hotsphink
hotsphink / text.txt
Created August 23, 2019 17:51
mkgist-created gist
#!/bin/sh
# Some options from https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Valgrind
LOGFILE=/tmp/vg.$$
export G_SLICE=always-malloc
/usr/bin/valgrind --trace-children=yes --smc-check=all-non-file --vex-iropt-register-updates=allregs-at-mem-access --read-inline-info=yes --num-callers=50 --log-file=$LOGFILE --leak-check=full --fullpath-after=src/ "$@"
cp $LOGFILE vg.log
if grep -e 'ERROR SUMMARY: [^0]' $LOGFILE; then
@hotsphink
hotsphink / offsets.txt
Created August 21, 2019 22:14
All fields in Gecko, with their offsets
This file has been truncated, but you can view the full file.
0 ._1061.ext_data : _XExtData*
0 ._1061.private1 : _XPrivate*
0 ._106.exemplar : Int
0 ._106.key : Int
0 ._107.exemplar : Int
0 ._107.key : Int
0 ._109.exemplar : Int
0 ._109.key : Int
0 ._110.name : Int*
0 ._110.type : Int
@hotsphink
hotsphink / text.txt
Created August 19, 2019 20:03
mkgist-created gist
Taskcluster: Client ID mozilla-auth0/oauth2|firefoxaccounts|e2ef182f34964608bfd1cdc975060a70|[email protected] does not have sufficient scopes and is missing the following scopes: ``` hooks:trigger-hook:project-gecko/in-tree-action-1-generic/9a01d0526d ``` This request requires the client to satisfy the following scope expression: ``` hooks:trigger-hook:project-gecko/in-tree-action-1-generic/9a01d0526d ``` --- * method: triggerHook * errorCode: InsufficientScopes * statusCode: 403 * time: 2019-08-19T20:00:45.847Z
@hotsphink
hotsphink / pseudo.txt
Created July 8, 2019 18:06
mkgist-created gist
void JSString::traceBase(JSTracer* trc) {
MOZ_ASSERT(hasBase());
JSString* oldBase = d.s.u3.base;
if (I am a DependentString) {
// Handle the case where I am a dependent string of an undependend string,
// and therefore my chars are actually coming from its base.
base = my base
while (my chars do not come from MaybeForwarded(base).chars) {
if (base.hasBase)
base = base.base
@hotsphink
hotsphink / bug-explanation
Created July 3, 2019 18:05
mkgist-created gist
ExtensibleString A -> "blahblah"
UndependedString B
.base -> A
.chars -> "hbl\0" (owned)
DependentString C
.base -> B
.chars -> "b" (from A')
@hotsphink
hotsphink / text.txt
Created July 3, 2019 18:04
mkgist-created gist
void JSString::traceBase(JSTracer* trc) {
MOZ_ASSERT(hasBase());
JSString* oldBase = d.s.u3.base;
if (I am a DependentString) {
base = my base
while (my chars do not come from base)
base = base.base
}
TraceManuallyBarrieredEdge(trc, &d.s.u3.base, "base");
if (oldBase != d.s.u3.base) {
@hotsphink
hotsphink / text.txt
Created July 3, 2019 18:03
mkgist-created gist
function makeExtensibleString() {
var s = "x";
var t = "yyyyyyyyyyyyyyyyyyytyyyyyy";
var r1 = t + s;
ensureFlatString(r1);
return r1;
}
function test() {
const s0 = makeExtensibleString();
@hotsphink
hotsphink / text.txt
Created July 2, 2019 21:47
mkgist-created gist
function makeExtensibleString() {
var s = "xxxxxxxx";
var t = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 31 characters
var r1 = t + s;
r1.match(/x/);
return r1;
}
function test() {
const s = makeExtensibleString();
@hotsphink
hotsphink / text.txt
Created July 2, 2019 21:45
mkgist-created gist
function makeExtensibleString() {
var s = "xxxxxxxx";
var t = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 31 characters
var r1 = t + s;
r1.match(/x/);
return r1;
}
function test() {
const s = makeExtensibleString();
@hotsphink
hotsphink / text.txt
Created June 28, 2019 19:02
mkgist-created gist
diff --git a/tools/rb/fix_stack_using_bpsyms.py b/tools/rb/fix_stack_using_bpsyms.py
--- a/tools/rb/fix_stack_using_bpsyms.py
+++ b/tools/rb/fix_stack_using_bpsyms.py
@@ -180,21 +180,24 @@ def addressToSymbol(file, address, symbo
p = getSymbolFile(file, symbolsDir)
if p:
return p.addrToSymbol(address)
else:
return ""