4 ms·
If your C code causes a segfault, is it fair to reason that there's a memory management error in the code? Does that make it practical to find where, so that y
by anonymars 9d ago
If your C code causes a segfault, is it fair to reason that there's a memory management error in the code? Does that make it practical to find where, so that you can just add a check for it?
- aaron695 9d ago[dead]
- lazide 9d agoWhat if it only happens on a single machine? Memory defaults can also cause segfaults.
- deleted 9d ago[deleted]
- thin_carapace 9d agowhat if segfaults only occurred when the errant path was executed in manners not initially designed for? or alternately, if that code path never got touched, would we ever have known about the segfault? should we keep focusing on segfaults or look at the ways that programs are being operated out of scope?
- deleted 9d ago[deleted]
- HeavyStorm 9d agoThere are two fallacies in your analogy. Segfaults are precise symptoms - they occur only when there's a memory issue. Autism isn't precise, is a collection of characteristics that manifest differently in each person. Genetic is, for the purpose of this conversation, a precise diagnosis - means you carry parent genes that will cause the issue. Memory management isn't: what caused it? Code error? OS error? Processor? Is it a bad code path or a unexpected exrtenal state? Finally, an analogy of your analogy: you measure someone temperature and it's 40C. You diagnose a fever. Segfaults are fever, just a symptom.
- hyperhello 9d agoAre we still talking about testing for autism?
- anonymars 9d agoI should have known better than to try an analogy here
- anonymars 9d agoThe analogy is "just because most X are caused by Y, doesn't mean you can easily test for X by looking at Y" I don't think your first point (how specific/precise are the symptoms of X) changes things, and I think your second point reinforces the analogy rather than weakens it. Most segfaults are coding errors and not OS or hardware errors ("look for horses, not zebras" / "SELECT isn't broken"). Even good medical tests have false positives and false negatives > Most autistic people are autistic because of genes they got from their parents. This is why autism often runs in families. Much less commonly, other factors can play a role, but usually in combination with genes from parents.