5 ms·
I like this, and kudos for going for assembly language. It is certainly true that reducing dependencies reduces the attack surface for something, that does not,
by ChuckMcM 3y ago
I like this, and kudos for going for assembly language. It is certainly true that reducing dependencies reduces the attack surface for something, that does not, in and of itself, make it "secure". But yes, in a probabilistic sort of way it reduces the chances of exploits. Of course assembly language has zero memory safety or other guarantees which probabilistically increases risk. I can't say if I think they balance out one way or the other. Still, I love me some assembly language applications. For extra credit transpile it to aarch64 and then you can run it on a Pi-Zero (or Pi-W) in a wall wart :-).
I have been researching, off and on, distributed forums. As forums like the one created here became the "go to" after Usenet fell out of favor I have thought a replacement would have both the distribution/replication features of Usenet and the user experience of phpBB (the grandparent of most forum software).
Making it distributed, and eventually consistent, is an excellent distributed systems challenge. So it is kind of like relaxing to a puzzle. If you, gentle reader, have written something along those lines I'd love to have a look.
- 10000truths 3y ago> Of course assembly language has zero memory safety or other guarantees which probabilistically increases risk. I can't say if I think they balance out one way or the other. I would posit that assembly + Linux kernel ABI is safer than the traditional C/C++ stack because they are not littered with nearly as much "undefined behavior". Signed arithmetic overflows and underflows as expected. Memory allocation with mmap + MAP_ANONYMOUS initializes it to 0 as expected. Accessing unmapped memory in your address space (including address 0) triggers a SIGSEGV as expected. Your assembler makes much fewer assumptions than your C compiler and doesn't try to be half as clever, so it's more likely to crash and burn on error instead of silently subverting your expectations.
- mgaunard 3y agoThis isn't a problem in practice because C++ developers are expected to know the rules of their language and respect them.
- 0x0 3y agoI think you meant "in theory" instead of "in practice" :)
- moron4hire 3y agoI think it was meant sarcastically
- mgaunard 3y agoIt wasn't sarcastic. Being a C++ developer requires discipline, and that's why hiring is much more selective and specialized.
- badsectoracula 3y agoI'm certain "in practice" was intentional, after all this seems to be what C++ compiler developers expect :-P
- badsectoracula 3y ago> C++ developers are expected to know the rules of their language and respect them In the same way children are expected to respect fire :-P
- IshKebab 3y agoMaybe so but I wouldn't recommend running forum software written in C++ either! "This footgun is safer than a footknife!"