Ticket #105 (closed cage: fixed)
Enforce NULL checks on C function arguments
Reported by: | Infinoid | Owned by: | infinoid |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | |
Severity: | medium | Keywords: | headerizer |
Cc: | Language: | ||
Patch status: | Platform: |
Description
In http://www.nntp.perl.org/group/perl.perl6.internals/2008/12/msg49677.html, Nicholas Clark suggested we autogenerate some checks for NULL pointers in C function arguments. This seems like a good idea, so I'm doing so.
I've already found a few such issues, two of which are fixed here: http://www.parrotvm.org/svn/parrot/revision?rev=34525
I've got at least one more issue that I haven't found the right solution for yet (Parrot_ascii_charset_ptr is NULL in miniparrot, triggering an assert failure when string_make_direct is called). So it's still a work in progress. But I'm going to post the diffs of what I've done so far.