Skip to content

Instantly share code, notes, and snippets.

View eseidel's full-sized avatar

Eric Seidel eseidel

View GitHub Profile
@eseidel
eseidel / terror.rust
Created August 3, 2021 03:39
so unsafe
#[no_mangle]
pub extern "C" fn wrenSetSlotNewForeign(
vm: *mut WrenVM,
slot: c_int,
class_slot: c_int,
size: size_t,
) -> *mut c_void {
let mut user_data = UserDataWrapper {
buffer: vec![0; size].into_boxed_slice(),
@eseidel
eseidel / with_stacks.txt
Created May 30, 2021 22:24
rusty_ethereum inc() Failure with stacks
macbook-pro [75280:rusty_ethereum]% cargo run [~/Documents/GitHub/rusty_ethereum]
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Running `target/debug/rusty_ethereum`
inc(): [37, 13, 03, C0, 51, BF, F7, 26, 10, 0A, D1, 38, 71, CA, BA, BF, 50, C2, 0D, D9, 20, FC, A1, 37, E5, 19, F9, 8F, 08, 9A, 74, B4]
60: PUSH1 (0x80)
0x80
60: PUSH1 (0x40)
0x40,0x80
52: MSTORE
@eseidel
eseidel / foo.txt
Created May 30, 2021 21:52
rusty_ethereum bugs
Got contract, executing!
60: PUSH1 (0x80)
60: PUSH1 (0x40)
52: MSTORE
34: CALLVALUE
CALLVALUE: -> 0x00
80: DUP1
DUP1: -> 0x00
15: ISZERO
ISZERO -> true
@eseidel
eseidel / main.dart
Created February 27, 2021 21:48
Set<List<String>> lack of uniqueness footgun
void main() {
Set test = Set();
test.add(['a']);
test.add(['a']);
// The fact that this is not 1, is a footgun. :/
print("test: ${test.length}");
}
@eseidel
eseidel / null_build.txt
Created June 17, 2020 22:40
null build after dart.lib patches
C:\src\engine\src [master +4 ~1 -0 !]> ninja -C .\out\host_debug_unopt\ -v -d explain
ninja: Entering directory `.\out\host_debug_unopt\'
ninja explain: output flutter_web_sdk_stamp doesn't exist
ninja explain: flutter_web_sdk_stamp is dirty
ninja explain: obj/flutter/web_sdk/web_engine_sources.stamp is dirty
ninja explain: output flutter_web_engine_sdk_stamp doesn't exist
ninja explain: flutter_web_engine_sdk_stamp is dirty
ninja explain: obj/flutter/web_sdk/web_ui_sources.stamp is dirty
ninja explain: obj/flutter/web_sdk/web_sdk.stamp is dirty
ninja explain: obj/flutter/flutter.stamp is dirty
@eseidel
eseidel / ninja.txt
Created June 17, 2020 16:12
null build with -d explain
C:\src\engine\src [master]> ninja -C .\out\host_debug_unopt -v -d explain
ninja: Entering directory `.\out\host_debug_unopt'
ninja explain: output gen_snapshot.lib doesn't exist
ninja explain: gen_snapshot.exe is dirty
ninja explain: gen_snapshot.exe is dirty
ninja explain: gen/flutter/lib/snapshot/vm_isolate_snapshot.bin is dirty
ninja explain: gen/flutter/lib/snapshot/vm_snapshot_instructions.bin is dirty
ninja explain: gen/flutter/lib/snapshot/isolate_snapshot.bin is dirty
ninja explain: gen/flutter/lib/snapshot/isolate_snapshot_instructions.bin is dirty
ninja explain: obj/flutter/lib/snapshot/generate_snapshot_bin.stamp is dirty
@eseidel
eseidel / log.txt
Created June 16, 2020 01:14
Log from felt_windows.bat build -w
C:\src\engine\src [master]> .\flutter\lib\web_ui\dev\felt_windows.bat build -w
"Running \`pub get\` in 'engine/src/flutter/web_sdk/web_engine_tester'"
Resolving dependencies...
Got dependencies!
"Running \`pub get\` in 'engine/src/flutter/lib/web_ui'"
Resolving dependencies...
Got dependencies!
Running gn...
Generating GN files in: out\host_debug_unopt
Generating Visual Studio projects took 4102ms
@eseidel
eseidel / success.txt
Created June 15, 2020 23:59
Successful run with windows-style path for --local-engine-src-path
C:\Users\Study\Documents\GitHub\slide_puzzle [master ≡ +1 ~0 -0 !]> flutter run -d web --web-port 8080 --local-engine=host_debug_unopt --local-engine-src-path=C:\src\engine\src -v
[ +114 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git -c log.showSignature=false log -n 1
--pretty=format:%H
[ +75 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 248d746575b713da74144750527356a1c0095546
[ +1 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git tag --contains HEAD
[ +253 ms] Exit code 0 from: git tag --contains HEAD
[ +2 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git describe --match *.*.*-*.*.pre --first-parent
--long --tags
@eseidel
eseidel / normal_run.txt
Created June 15, 2020 23:55
log from a normal (no local-engine-path) run
C:\Users\Study\Documents\GitHub\slide_puzzle [master ≡ +1 ~0 -0 !]> flutter run -d web --web-port 8080 -v
[ +108 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git -c log.showSignature=false log -n 1
--pretty=format:%H
[ +75 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 248d746575b713da74144750527356a1c0095546
[ ] executing: [C:\Users\Study\Documents\GitHub\flutter/] git tag --contains HEAD
[ +252 ms] Exit code 0 from: git tag --contains HEAD
[ +2 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git describe --match *.*.*-*.*.pre --first-parent
--long --tags
[ +103 ms] Exit code 0 from: git describe --match *.*.*-*.*.pre --first-parent --long --tags
@eseidel
eseidel / log.txt
Created June 15, 2020 23:25
clean build
C:\Users\Study\Documents\GitHub\slide_puzzle [master ≡ +1 ~0 -0 !]> flutter run -d web --web-port 8080 --local-engine=host_debug_unopt --local-engine-src-path=/src/engine/src -v
[ +116 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git -c log.showSignature=false log -n 1
--pretty=format:%H
[ +74 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 248d746575b713da74144750527356a1c0095546
[ +1 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git tag --contains HEAD
[ +257 ms] Exit code 0 from: git tag --contains HEAD
[ +2 ms] executing: [C:\Users\Study\Documents\GitHub\flutter/] git describe --match *.*.*-*.*.pre --first-parent
--long --tags
[ +106 ms] Exit code 0 from: git describe --match *.*.*-*.*.pre --first-parent --long --tags