[Bf-committers] Using assert()?
nicholasbishop at gmail.com
Thu Aug 12 20:30:43 CEST 2010
In the specific case you mention (improper use of an array), valgrind
will usually catch the error.
On Thu, Aug 12, 2010 at 2:24 PM, Torsten Rupp <torsten.rupp at gmx.net> wrote:
> Dear developers,
> sometimes I see a SigSegV when using blender. When I'm able to
> reproduce the problem I try to trace it back. Sometimes it is a
> problem either with an array (to small or not initialized) or with
> some pointer. With other software projects I made good
> experiences to place assert() in the code to detect such problems
> early and and trace it back more easily instead of running into a
> For example, it may be helpful to add an assert-check before accessing
> an array (check if array is not NULL and check the size) or
> deferencing a pointer. Also pre- and post-conditions may help to find
> bugs more easily.
> I know there are already assert()-checks in the blender code. Were
> adding more assert()-code ever a discussion here?
> Best regards,
> Bf-committers mailing list
> Bf-committers at blender.org
More information about the Bf-committers