octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

input validation in C++ internal functions


From: Andreas Weber
Subject: input validation in C++ internal functions
Date: Mon, 05 May 2014 08:47:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

Dear maintainers,

__calc_dimensions__ called from the interpreter without arguments causes
a segmentation fault. For me this raised the question how I should treat
this type of error because I remember reading something like "we do no
input checking in internal functions".

In my humble optinion no function should segfault when accessible from
the octave interpreter. It is okay for me if pure C++ API calls (not
seen from .m files) crashes when called with wrong inputs.

In the case of __calc_dimensions__ (see diff attached) print_usage was
called previously if the number of inputs doesn't match but args(0) is
accessed however.

I tried to discuss this on IRC and Jordi asked my to discuss this on the
maintainers-list because his conception is to not clutter intenal
functions with input checking.

Any feedback and suggestions highly appreciated.

-- Andy

Attachment: graphics.cc.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]