CatSalad🐈🥗 (D.Burch) 

@catsalad@infosec.exchange
18.6K Followers
3.8K Following
33.5K Posts

Privacy advocate 〱 Malware analyst 〱 Cybersecurity
〰️ ⁠InfoSec 〰️ ⁠DFIR 〰️ ⁠CISSP 〰️ ⁠黑客 〰️ ⁠Katzenmädchen
 ⁽ʰᵒᵖᵉ ʸᵒᵘ ˡⁱᵏᵉ ᶜᵒʳⁿʸ ʲᵒᵏᵉˢ ᵃⁿᵈ ᶜᵃᵗˢ⁾

【 Professional Computer Booper 】
Even my brain has certs (asd,adhd,...)
Gender: a threat model  (they/them)

”Hän on vähän sellainen kusilonkki”

__😺😷🔛Ⓜ️🦠🏺🐈‍⬛🩷🩵🔬🧑🏻‍💻🛏️💤__
#Android #BLM #CatSalad #CyberSecurity #Developer #DFIR #Emojis #enby #fedi22 #Hacker #InfoSec #Malware #MasksWork #PenTest #Privacy #Puns #PurpleTeam #Security #tfr #Tor #TransRights #Unicode #Veilid #ಠ_ಠ #ʘ‿ʘ

Main² (HTown)🥗https://masto.hackers.town/@catsalad
Main³ (Floof)🌈https://lgbtqia.space/@catsalad
🔺🔻https://defcon.social/@catsalad
Githubhttps://github.com/devsalad
Keyoxidehttps://keyoxide.org/534C7832701F8A6612D289B1A2F5593628046A9E
Just CatSalad Tootshttps://justmytoots.com/@catsalad@infosec.exchange

On the Fediverse, reply guys aren't limited to men.

We also have:
mentioNBs and rejoindHers

We can learn a few things from frogs

#Frogs #Nature #Science

@mycrowgirl It's so tough 🫂
AAAAAAAAAAA MONDAY
@Ananas @alex Nice sleuthing! Also... vegemite om toast 🤢

@alex @catsalad

Nevermind you're right it is Vegemite

https://youtube.com/watch?v=ED7npEJ54sU

The Most Australian World Record Ever!

YouTube
Do ants even have toes? 🐜
good clouds this arvo 🗻 #富士山
×
Funny FPU trick I discovered yesterday to detect arm64 or x86_64 architecture at runtime

@pancake

Interesting.

Drop stdint and workaround it. See what happens.

@SpaceLifeForm nothing happens. same results. use "unsigned long long" instead of uint64_t if you want

@pancake

This gets curiouser and curiouser.

I am thinking it is due to microcode differences.

Actually, just the instruction set.

Something is happening differently because sqrt(-1) is using an invalid parameter to the call in the first place.

errno needs to be checked immediately.

@pancake

Also, compile without optimization.

@SpaceLifeForm same results with -O0, or -O3 for me, clang and gcc on linux and mac
@pancake pretty neat; I have tested on Linux arm64 and x86_64; both works!

@pancake now try with musl, i386, m68k, ppc64el, sparc64, s390x, …

As if there were only two architectures in existence.

@mirabilos musl/glibc/bsd/linux/macos/windows have nothing to do with that. it's just how the FPU behaves (already tested anyway). About other archs would be cool to test indeed, but i have other important tasks to do and this finding was just a corner case of what I was looking for. Feel free to post the results
@pancake only if it maps directly to the FPU and does not do anything else.
@mirabilos and that's what it is

@pancake

Another thought. Did you rebuild libm from source without optimisation?

@pancake absolutely cursed. please make more.
@pancake I hardly know any C/C++ but even I can tell this is cursed.
@pancake What? Lmao. What strange behavior.
@pancake How did you even discover this?
@pancake According to IEEE 754, that’s just the difference between a quiet NaN and a signaling NaN. No idea why both platforms would handle that differently by default, but I think to get reproducible behavior you’d have to explicitly configure the FPU before you try to take the square root of a number smaller than -0. So I would not depend on it in any kind of portable code. Interesting behavior, though.
@pancake ah, is this taking advantage of the fact that x87 has an 80-bit fpu while arm is 64-bit?

@pancake

Is that really hardware? Or library/implementation side effects? Still could be very reliable. But there's likely a lot of software under that.

@pancake how does this behave on RISCV & other cute less common architectures?
@pancake isn't there a more respectable function that already checks that?