Click here to Skip to main content
15,915,603 members

Survey Results

Who should take responsibility for library function calls?   [Edit]

Survey period: 17 Feb 2003 to 23 Feb 2003

When a library function is called, who is responsible for ensuring that the input data will not cause a program to crash, or worse - be susceptible to a security hole?

OptionVotes% 
The programmer calling the function should ensure the supplied input data is valid.11210.82
The programmer who wrote the library function should ensure that all input data is valid.43341.84
Both library function writer and caller should validate all input data independently.44042.51
Neither - just use try...catch blocks to handle any problems.504.83



 
GeneralRe: Both library function writer and caller should validate all input data independently Pin
Pit M.20-Feb-03 20:33
Pit M.20-Feb-03 20:33 
GeneralRe: Both library function writer and caller should validate all input data independently Pin
chifor20-Feb-03 21:54
chifor20-Feb-03 21:54 
GeneralData validation Pin
Anders Dalvander16-Feb-03 20:14
Anders Dalvander16-Feb-03 20:14 
GeneralRe: Data validation Pin
Tim Smith17-Feb-03 8:08
Tim Smith17-Feb-03 8:08 
GeneralOpen Source Pin
Anders Dalvander17-Feb-03 8:51
Anders Dalvander17-Feb-03 8:51 
GeneralRe: Open Source Pin
Anders Dalvander17-Feb-03 9:07
Anders Dalvander17-Feb-03 9:07 
GeneralRe: Open Source Pin
#realJSOP18-Feb-03 2:21
professional#realJSOP18-Feb-03 2:21 
GeneralRe: Open Source Pin
Anders Dalvander18-Feb-03 2:39
Anders Dalvander18-Feb-03 2:39 
John Simmons / outlaw programmer wrote:
ASSERTS are a BAD idea.

Not really, they help eliminating erronious code, if I make an assert the caller knows that something is wrong, if the program crashes he/she will have much less clue of what happened. He/she should then read the documentation or look at the source code.

John Simmons / outlaw programmer wrote:
I'd rather write the code correctly than use ASSERTS.

Then stop calling my functions with invalid data if you should code correctly.

John Simmons / outlaw programmer wrote:
What if the person calling your library function doesn't have the source code to it, and your code ASSERTS for some reason?

If it is Open Source he/she could download it, or he/she could look at the documentation, or he/she could actually read the assert message instead of just clicking ignore.

John Simmons / outlaw programmer wrote:
What a crock of horseshit. Crap design = crap performance.

Okay then, develop a game engine that is 100% crash proof whatever I send to it, look at the performance, remove all your guards, and compare the performance again.

Are you really using IsBadReadPtr, IsBadWritePtr, IsBadStringPtr and IsBadCodePtr on ALL pointers in your, so called safe, code?
GeneralRe: Open Source Pin
#realJSOP18-Feb-03 3:42
professional#realJSOP18-Feb-03 3:42 
GeneralRe: Open Source Pin
Anders Dalvander18-Feb-03 5:16
Anders Dalvander18-Feb-03 5:16 
GeneralRe: Open Source Pin
Anonymous18-Feb-03 5:18
Anonymous18-Feb-03 5:18 
GeneralRe: Open Source Pin
Anders Dalvander18-Feb-03 7:19
Anders Dalvander18-Feb-03 7:19 
GeneralRe: Open Source Pin
Anders Dalvander18-Feb-03 5:34
Anders Dalvander18-Feb-03 5:34 
GeneralIt depends... Pin
Paul M Watt16-Feb-03 18:29
mentorPaul M Watt16-Feb-03 18:29 
GeneralRe: It depends... Pin
Jeff J16-Feb-03 21:39
Jeff J16-Feb-03 21:39 
GeneralRe: It depends... Pin
Navin17-Feb-03 7:56
Navin17-Feb-03 7:56 
GeneralAnd then...? Pin
Shog916-Feb-03 18:10
sitebuilderShog916-Feb-03 18:10 
GeneralRe: And then...? Pin
NormDroid17-Feb-03 3:07
professionalNormDroid17-Feb-03 3:07 
GeneralRe: And then...? Pin
Tim Smith17-Feb-03 8:06
Tim Smith17-Feb-03 8:06 
GeneralRe: And then...? Pin
#realJSOP18-Feb-03 2:18
professional#realJSOP18-Feb-03 2:18 
GeneralRe: And then...? Pin
bgiraya18-Feb-03 4:28
bgiraya18-Feb-03 4:28 
GeneralRe: And then...? Pin
Lunchy17-Feb-03 4:09
Lunchy17-Feb-03 4:09 
GeneralRe: And then...? Pin
Jon Taylor17-Feb-03 22:34
Jon Taylor17-Feb-03 22:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.