| PLEX86 | ||
|
Lit. Buffer overruns 1704snip If I gave the impression that I thought that was a reasonable general approach to fixing buffer overruns -- not at all!! In many circumstances (I would say "most" but could be wrong), that just changes the probability of tripping over the error; it doesn't remove the error. Lit. Buffer overruns 1706 Sure. And how do you think limits are imposed? It's handshaking between the application, the user, and the operating system with the constraint imposed by hardware. If your app code can't request... Lit. Buffer overruns 1708 Ok. I'll try to watch for different meanings. So far, I hadn't detected any. Note that there are many ways to "allocate" many flavors of space. I understood your use. I was trying... My thinking is that before an application developer writes (in C) "ai = 5", he or she should be very sure that the memory address that corresponds to ai is within a's bounds. If there is any uncertainty, he-she should put in a bounds check and, um, "take appropriate action" if i is outside the range of acceptable values. I honestly don't understand why failing to do this is apparently such a common problem. But I think that part of this topic has been thoroughly discussed elsethread. As for the more general case of dereferencing bad pointers, hm, some of them probably result from other programming errors that I'm not thinking of right now, but the ones that result from, say, buttuming that malloc will return a non-null pointer and not checking, well, same thing as above -- if you're trying to write robust code, you should be checking. snip "You young dudes"? "Sigh!" :-) Lit. Buffer overruns 1705 Ah, I think we must not mean the same thing by "buffer". I'm using it to mean space allocated and controlled by a program, usually an application program. A carelessly written program can easily... As I thought we established in a sociopolitical-commentary thread last fall (?), I'm neither male nor particularly young, and I've been doing computing-related stuff more or less full-time since about 1978. (If you don't remember the sociopolitical thread I'm referring to -- just as well.) My first few programming clbuttes used punch cards. What do I have to do to qualify as an "auld fart"? I sure feel like one some days ....
Yeah. I once read a suggestion in some other newsgroup that every programmer should maintain "personal bozo list" -- of problems he-she seemed to trip over regularly, and then any time there was trouble, the first thing to do is review the list. Similar idea, though I suppose ideally you'd review your bozo list even before there were problems .... snip -- B. L. Mbuttingill ObDisclaimer: I don't speak for my employers; they return the favor.
|
||||||||