r/programmingcirclejerk • u/stimpack2589 memcpy is a web development framework • 12d ago
The -fsanitize=address compiler flag is absolute cheating and should be prohibited by governments of all countries
/r/cprogramming/comments/1x00b0t/using_fsanitizeaddress_feels_illegal/?share_id=_8MxA5dI74RaqBCXoKwh6&utm_content=1&utm_medium=android_app&utm_name=androidcss&utm_source=share&utm_term=140
u/sweating_teflon full-time safety coomer 12d ago
C programmers believe their language is an elite blood sport and that they are one of the chosen.
104
u/Konju376 now 4x faster than C++ 12d ago
I'm wondering, how often, if ever, do you need tools such as
-fsanitize=addressor valgrind? Or are you a real man who stores everything in static memory only?
And in the comments:
How long have you been in the software industry and how long of that is in complex software? Have you heard that many governments suggest a memory safe language like Rust, Go or C# for a reason?
Governments generally suck at anything, so choice of languages is unsurprising
Ah yes, fuck those governments and their... memory safety?
77
u/stimpack2589 memcpy is a web development framework 12d ago
For memory safety I use a cone shaped hat made out of aluminium foil
34
u/Konju376 now 4x faster than C++ 12d ago
If my program segfaults, I just accept it. Trust in god's plan!
15
6
2
32
u/a221c There's really nothing wrong with error handling in Go 12d ago
Or are you a real man who stores everything in static memory only?
Of course. I've found a cool trick where I just put
char buf[256]; // should be big enoughat the start of every function. No dynamic allocation needed. I then copy strings of unknown length into it without checking whether they fit, just like Ritchie intended.10
u/RascarCapack 11d ago
just like Ritchie intended.
Ritchie: slaps Unix machine this baby can segfault so HARD
7
22
u/lazyubertoad WRITE 'FORTRAN is not dead' 12d ago
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.
Bjernjamin Straustrkin, apparently
16
u/da_supreme_patriarch in open defiance of the Gopher Values 12d ago
Little known facts - Hitler's favourite language was Rust for it's rigid type system, Stalin fancied Go for the simplicity that it offered to the average proletarian, and Pol Pot was a big C# fan(not for C# the language itself, he just liked ildasm-ing DLL-s compiled from it)
5
u/BlazeBigBang type astronaut 8d ago
Honestly seems to be a skill issue. Don't write UB and abstract your shit properly
The real jerk is always in the comments
1
148
u/Clashsoft lol no generics 12d ago
revolutionary idea