Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

Evan Martin

@evmar@inuh.net
mastodon 4.7.3
  • Open on inuh.net
196 Followers
47 Following
24 Posts
Joined November 15, 2022
website:
https://neugierig.org
Open post
Evan Martin @evmar@inuh.net
· 2w ago

My fav piece of new Canada trivia is that there is a US law that ships moving between US ports must be US built and crewed, so cruise ships that go from the west coast to Alaska just make a stop in Victoria BC so it becomes an “international” trip.

7
0
1
0
Open post
Evan Martin @evmar@inuh.net
· 2w ago

Family trip, tech unsavvy grandma handed seven year old her tablet, he played a game and immediately clicked into >$200 of in-app micro transactions. We as an industry know this happens all the time, somehow powerless to stop it.

Then I’m called in as tech guy to help disable payments. It’s Google ecosystem so none of the online instructions work, all of the menus have been changed around repeatedly.

6
0
0
0
Open post
Evan Martin @evmar@inuh.net
· 1w ago

I sometimes see people remark in programming forums about how they use version control to store things but don't care about features more than that. Here's a little trick I used today.

My current program stores its state in a tree of text files. (This is already useful because I get version control, e.g. diffing etc. for the data itself.)

I realized I wanted to migrate to a different data format. How to manage it?

2
0
0
0
Open post
Evan Martin @evmar@inuh.net
· 2w ago

I took the ferry back to Seattle from my brief Canada trip. I tried getting in a cab upon arriving.

First guy said he had no credit card reader, a common scam so I I said nope. Loaded my luggage into a second cab and then the guy said he had no meter and quoted me double the price of what the ride should have been. Jumped right out of that.

It’s a shame that a company as sketchy as Uber ends up relatively reputable.

3
0
0
0
Open post
Evan Martin @evmar@inuh.net
· 2w ago

Accidentally bumped the "add to contacts" button in a context menu on macOS. Check out the list of chat services that supports!

Retrocomputing lives on, in forgotten macOS features!

4
0
0
0
Open post
Evan Martin @evmar@inuh.net
· 1w ago

Today I remembered (because I had commented on a bug 8 years ago and forgotten about it) that when nodejs spawns a subprocess, stdin is a socket, not a pipe, which means reading /dev/stdin doesn't work (edit: fixed this, see comments).

And I sorta chuckled to myself and added it to my list of why I never use node when I can avoid it. So many weird cases like these.

https://github.com/nodejs/node/issues/21941

github.com
1
0
1
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago

New blog post: Theseus, a static Windows emulator
An new old approach to emulation.

https://neugierig.org/software/blog/2026/04/theseus.html

neugierig.org
57
0
19
1
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
Anyway if you read the thread this far, here's a screenshot of the missing phase 2, now rendering properly.
5
4
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago

Speaking of common names, we gave our son a pretty unique one: his mom's last name was already rare, and his is a common name from a different part of the world such that the two together are almost certainly globally unique.

On one hand, this is kind of nice, to not have the name conflicts I encounter so often. On the other, sometimes I think it's kind of nice that you can never be quite sure whether some fact is about me or about some doppelnamer. It's almost a kind of privacy.

4
4
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
The first step was trying to isolate the problem. I disassembled enough of the code to figure out that the phases were (thankfully) pretty simple sequential code. The cool new thing about the static translation approach of Theseus is that I can modify the translated source code by hand, so it was easy to patch out the call to phase1 and panic in phase3, which reduced the problem to the program immediately entering and then leaving phase2.
3
8
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
The culprit was a function that was using edi for its own purposes. It was correctly using push/pop edi to preserve the caller's value, but that was going wrong. The stdcall ABI used on Windows means the callee pops arguments off the stack. This means when the culprit function calls one of my functions and I had the arguments wrong, the stack pointer gets off by an entry or two. I've written this bug so many times! This meant the restored edi was instead some other garbage on the stack.
3
6
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
@thakis Thinking about it more: also I've mostly written Rust the last few years and Rust is a lot worse than C++ in a debugger. E.g. you can't evaluate any complex expressions, and even evaluating a reference like "foo.bar.baz" in Rust you have to manually change to "foo.bar->baz" depending on whether any of the intermediate components are references or not.
2
1
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
From there, I could see that phase2 was intended as a loop and that the loop was exiting. Again, because I have translated source code I could use my system debugger to step through it, though the control flow is harder than normal code. From there, I could see that edi was some sort of counter that started at 0, but after a single pass through the loop it had a garbage value. The system debugger's watch points tracked it down further, possibly the first time I've used those.
2
7
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
Normally screwing up the stack pointer in this way makes things go immediately wrong elsewhere because it fails to return to the right address. But in this case, the function was using ebp to save/restore the stack pointer, totally masking that I had messed up the stack pointer -- except in how it was failing to preserve this register, the cause of this bug. This is the same masking @aaronsgiles wrote about in https://corteximplant.com/@aaronsgiles/116044322660755992 .
corteximplant.com
2
5
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago

New blog post: Theseus unpacking
Revisiting unpacking executables.

https://neugierig.org/software/blog/2026/04/theseus-unpack.html

(A more structured description of my earlier ramble...)

neugierig.org

Tech Notes: Theseus unpacking

Revisiting unpacking executables.

1
0
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
The variation is: first run Theseus on the packed executable, producing a program that unpacks and then jumps to a dynamic address (the address of the unpacked code, which Theseus didn't see to translate). Then modify that program to implement that address, and implement it by a function that calls back into the Theseus compiler to generate source code directly. No intermediate exe serialization needed! The unpacker has the unpacked data in memory, so I can codegen directly from there.
1
3
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
(Code is not really up to my expectations for good shape for publishing, sorry in advance if you attempt to read it! Was a fun nerd snipe in any case.)
1
0
0
0
Open post
Evan Martin @evmar@inuh.net
· 6mo ago
Replying to
@jyasskin https://en.wikipedia.org/wiki/Contronym
en.wikipedia.org
1
0
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
Unfortunately, I was so focused on how nifty this was that I overlooked the other reason to care about unpacking, which is loading the program in a tool like Ghidra. And for that I really do need an exe file.
0
2
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago
Replying to
In any case, the flow looks like this: $ tc --exe chillin.exe --out exe/chillin-unpack ... WARN tc/src/traverse.rs:40 omitting 004085dd: block appears zero-filled (This shows the code jmp'd to 004085dd, but there was no code there -- that's where the unpacked code starts.) Then I can hand-write a file that provides that function, where it re-invokes the compiler: https://github.com/evmar/theseus/blob/9e2b135af2c32df73f0965c4f5f5159432fb80fe/exe/chillin-unpack/src/externs.rs Which means the whole do_unpack function ends up relatively tiny: https://github.com/evmar/theseus/blob/9e2b135af2c32df73f0965c4f5f5159432fb80fe/exe/chillin-unpack/src/main.rs
GitHub

theseus/exe/chillin-unpack/src/externs.rs at 9e2b135af2c32df73f0965c4f5f5159432fb80fe · evmar/theseus

static translator for dos/win32 executables. Contribute to evmar/theseus development by creating an account on GitHub.

0
1
0
0
Open post
Evan Martin @evmar@inuh.net
· 5mo ago

Pet peeve: Rust projects whose repo is organized as a bunch of directories like
crates/$projectname_foo
crates/$projectname_bar

1) This is not organization! This is ravioli code. Directories and their nesting convey relationships.
2) You don't need to repeat the project name in every crate. In other words, the crate name is not required to match the directory name. If a project has a myproject-async-interp crate, it is easy to figure out that the path named async-interp is its home.

0
1
1
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 01:59:26 UTC