On Sun, Jan 2, 2011 at 2:08 AM, Nolan L <[email protected]> wrote:
> Whilst going through the NCI PMC for the purpose of increasing test
> coverage, I noticed inconsistent behavior of many of the VTABLE
> functions within. While some returned pointers to nci_info->orig_func,
> others operated on nci_info->func, creating that struct if it doesn't
> exist.

orig_func is the native function being wrapped by this nci pmc.

func is the (lazily created) thunk function providing the PCC>CABI translation.

They serve different purposes and both should be queriable.

> Is this expected behavior? If nci_info->orig_func is null, and the
> VTABLEs which operate on nci_info->func are called, instead of
> properly detecting this and throwing an exception, there is a failed
> assertion when the code attempts to generate nci_info->func from a
> null original.

NULL is certainly a valid value for orig_func and any assertions
against this are erroneous (exceptions generated are acceptable). If
you provide the script you've run to hit these assertions, we can get
started on fixing this problem. Also, patches welcome.

> Regards,
> Yuki`N
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to