OpenBSD test failures in t/src/extend_vtable.t
Jonathan "Duke" Leto
jonathan at leto.net
Thu Jul 21 18:24:45 UTC 2011
Howdy,
I wrote these tests originally, and I assumed that anything returned from the
get_pointer vtable should be a positive integer, since I assumed that all
memory locations were positive.
That assumption seems to be wrong on OpenBSD.
I recently modified [0] that test to provide more debugging output, so if you
update parrot.git and run the test again, it should print out the integer it
gets from get_pointer. If it is negative, then our test is wrong and your patch
would work fine. If it is returning 0 or NULL, then something is wrong with the
get_pointer vtable on OpenBSD.
Duke
[0] https://github.com/parrot/parrot/commit/3078cc6d18f4d301e4c8f844b30935c802bedff1
On Thu, Jul 21, 2011 at 7:41 AM, Andy Dougherty <doughera at lafayette.edu> wrote:
> Tests 70 and 71 in t/src/extend_vtable.t are failing for me in
> OpenBSD/i386.
>
> At a quick glance, it looks like both tests are wrong. They both do
> something like this:
>
> integer = (Parrot_Int) Parrot_PMC_get_pointer(interp, pmc);
> if (integer > 0)
> Parrot_printf(interp,"Got pointer!\n", integer);
>
> Is there any reason to assume that an arbitrary pointer cast
> to a (Parrot_Int) will be positive? I'd think a simple test that the
> pointer is non-NULL would be sufficient and appropriate. That is, I'd
> have been tempted to write it:
>
> void *ptr;
> ptr = Parrot_PMC_get_pointer(interp, pmc);
> if (ptr)
> Parrot_printf(interp,"Got pointer!\n");
>
> But perhaps there's more to the story.
>
> --
> Andy Dougherty doughera at lafayette.edu
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
--
Jonathan "Duke" Leto <jonathan at leto.net>
Leto Labs LLC
209.691.DUKE // http://labs.leto.net
NOTE: Personal email is only checked twice a day at 10am/2pm PST,
please call/text for time-sensitive matters.
More information about the parrot-dev
mailing list