Gynvael Coldwind
banner
gynvael.bsky.social
Gynvael Coldwind
@gynvael.bsky.social
Security researcher/programmer ⁂ Managing director @ HexArcana ⁂ @DragonSectorCTF founder ⁂ he/him
Exactly this!
November 13, 2025 at 10:49 AM
Yup! It's called Hash flooding / HashDoS (en.wikipedia.org/wiki/Collisi...)

They can collide due to the pigeon hole principle of course.
Collision attack - Wikipedia
en.wikipedia.org
November 13, 2025 at 10:42 AM
True - but why does it have to be random? There's a cool reason ;)
November 13, 2025 at 10:06 AM
Agreed! Also, the reason why the effective order is different in every run is pretty interesting ;)
November 13, 2025 at 9:31 AM
Ah, but this isn't just about the order - it's about why it's non-deterministic! There's an interesting story and reason behind that :)
November 13, 2025 at 9:31 AM
Yup. To be more exact, cPython's compiler does constant deduplication inside a compilation unit (i.e. a single "code" object). If it compiles lines separately like in normal REPL use, it won't deduplicate 257. If it would compile them at the same time (like in that py file), they get deduplicated.
November 9, 2025 at 9:30 AM
Source: a question asked by an attentive attendee at my Python workshop yesterday.
November 8, 2025 at 10:01 AM
Thanks! That's MacOS Terminal.app, right?
May 18, 2025 at 6:44 AM