Originally posted by ssokolow
View Post
Announcement
Collapse
No announcement yet.
Torvalds Voices Thoughts On Linux Mitigating Unexpected Arithmetic Overflows/Underflows
Collapse
X
-
- Likes 8
-
Originally posted by josmat View Post
I do not agree. I'm not a professional programmer, I have no diploma in computer science or any kind of engineering (my diploma is actually in music), just an amateur programmer and curious follower of Phoronix and the tech world. For me, wrap-around for integer arithmetic in computers is obvious. If there is people developing software that we use who don't know that, they're putting us in a risk. How can someone who works and gets paid for programming a computer don't know the basics of how a computer works?
I see this very often. Good, or even great programmers in some area, a few months later I found them lacking in threading, DB or God knows what other area.
Because of that, I will always go the route that makes thing more approachable. Though, after giving more thought to the matter at hand, it's not like you can get rid of overflows and replace that with properly working math. You run out of bits anyway, so the alternative would still be yet another hack/convention.
- Likes 2
Comment
-
Originally posted by carewolf View Post
"(a+b < a)" on unsigned a and b, is only true when a + b overflow. It is an overflow test! So obviously overflow is expected and explicitly handled, an analyser complaining about a check EXPLICITLY testing for overflow as possibly overflowing IS BROKEN.
Comment
-
Originally posted by ssokolow View Post
And I still say that every straw on that camel's back is one step closer to C++'s inhuman mess of things to remember. For example, is it clear, intuitive, and obvious after a dozen refactors that an overflow test there is the correct thing to do? It depends on what the actual variable names are.
- Likes 5
Comment
-
Here are my thoughts on this, and many similar, issues.
1. To the young generation nothing is sacrosanct -- if they believe C standard is wrong they will want to change it, everyone using it for 4+ decades be damned. I say, if you want to be protected from overflows write your code in C# which does runtime checking for it and leave C standard and compiler alone for the adults in the room who can handle it just fine or just learn to deal with it like we do.
2. They focus on irrelevant issues like this and make a lot of noise because they are trying to make their "conttributions" appear relevant -- it's all part of attention seeking behavior trained by growing up on Facebook, Instagram and Twitter coupled with total misunderstanding of the subject at hand. It's the same kind of people who want to change TOML file specification to allow INLINE table to SPAN SEVERAL LINES when there are already regular tables that can do that and allow deep nesting in it instead of just using JSON instead.
3. All of this is a symptom of "knowledge at our fingertips" where everyone thinks they can do any task after 5 minutes of Googling or "talking" to ChatGPT. It was way better 4 decades ago when everyone knew their place and only worked on stuff they have been trained to do.
TL;DR -- Let people who know about arithmetic overflows write kernel code in C while those who don't know AND don't want to learn stick to safe languages like C# or Rust and GUI / frontend programming.
- Likes 4
Comment
-
Originally posted by bug77 View Post
You'd be surprised how many programmers out there are only slightly better than script kiddies. Unfortunately.
I see this very often. Good, or even great programmers in some area, a few months later I found them lacking in threading, DB or God knows what other area.
Because of that, I will always go the route that makes thing more approachable.
We shouldn't be striving to lower the requirements to the lowest common denominator -- we should be striving to get people trained to meet those requirements. If some of them can't pass it's not the end of the world -- there are so many other things they can do with their lives.
- Likes 2
Comment
-
Originally posted by coder View PostTry looking in the mirror, before calling others insecure. Your own insecurity is the main reason you can't refute my posts point-by-point, as that would force you to actually reflect on what I'm saying.
Furthermore, if you really wanted to demonstrate your competence and superiority, you'd be making rational arguments instead of hurling insults at everything and everyone you don't like. Resorting to the discursive tactics of an angry school child paints yourself in a far worse light than anything I could probably say.
- Likes 1
Comment
-
Originally posted by sdack View PostGuess what, I am secure enough to ignore your problems. I have no need to help you. You are just a cockroach I step on, pardon my french. If you want my help, what are you offering?
- Likes 6
Comment
-
Originally posted by bug77 View Postit's not like you can get rid of overflows and replace that with properly working math. You run out of bits anyway,
Comment
Comment