Timeline for When should pointers be checked for NULL in C?
Current License: CC BY-SA 3.0
19 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 21, 2020 at 20:15 | review | Close votes | |||
| Feb 27, 2020 at 3:05 | |||||
| Feb 21, 2020 at 19:54 | history | protected | gnat | ||
| Feb 21, 2020 at 17:35 | answer | added | GlenL | timeline score: 0 | |
| Jul 5, 2018 at 9:49 | comment | added | PaulHK | In the case of API calls expecting valid pointer arguments I wonder what is the value of testing for only NULL? Any invalid pointer that gets dereferenced would be just as bad as NULL and segfault all the same. | |
| Jan 15, 2018 at 5:34 | comment | added | rwong | With the hindsight of the year of 2017, keeping in mind the question and most answers were written in 2013, does any of the answers address the issue of time-travelling undefined behaviors due to optimizing compilers? | |
| Jan 15, 2018 at 5:29 | answer | added | user204677 | timeline score: 4 | |
| Apr 12, 2017 at 7:31 | history | edited | CommunityBot |
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
|
|
| Feb 7, 2013 at 4:02 | vote | accept | Gabriel Southern | ||
| Feb 6, 2013 at 4:21 | answer | added | SMBiggs | timeline score: 6 | |
| Feb 6, 2013 at 3:32 | answer | added | barrem23 | timeline score: 1 | |
| Feb 6, 2013 at 1:10 | comment | added | Billy ONeal | See also: stackoverflow.com/questions/4390007/… | |
| Feb 6, 2013 at 1:09 | history | tweeted | twitter.com/#!/StackProgrammer/status/298961481628807169 | ||
| Feb 6, 2013 at 0:09 | answer | added | John R. Strohm | timeline score: 13 | |
| Feb 5, 2013 at 23:48 | answer | added | Karl Bielefeldt | timeline score: 17 | |
| Feb 5, 2013 at 23:35 | answer | added | Jay | timeline score: -1 | |
| Feb 5, 2013 at 23:32 | answer | added | whatsisname | timeline score: 1 | |
| Feb 5, 2013 at 23:24 | comment | added | Blrfl | If you're writing a function for an API where callers aren't supposed to understand the innards, this is one of those places where documentation is important. If you document that an argument must be a valid, non-NULL pointer, checking it becomes the caller's responsibility. | |
| Feb 5, 2013 at 22:59 | answer | added | Kaz | timeline score: 5 | |
| Feb 5, 2013 at 22:55 | history | asked | Gabriel Southern | CC BY-SA 3.0 |