in reply to inscrutable error in CPAN testing

Check your checks. Presumably you are allocating/relallocating memory somewhere, using some sort of IPC like shmem or maybe mmap. Check that the APIs called from XS are allocating enough memory, and that you are testing return values. You might also wish to check $!, or whatever mechanism you are returning errors (how do you indicate out-of-memory to the caller?). It could be that this particular tester has a low memory situation (runnning out of swap, for example).

The large negative numbers returned by some of the tests are probably pointers and often indicate uninitialised memory - as you probably know this is common when you run out of bounds.

Replies are listed 'Best First'.
Re^2: inscrutable error in CPAN testing
by cmac (Monk) on Mar 16, 2009 at 11:54 UTC
    The test in question allocates the minimum amount of shared memory allowed by the underlying mm module, which is 8KB. The second error message shows that 75xx of this 8K is still available at the time of the first error. Does this bear on the kind of problem you were thinking of?
      Yes, since you expected more than that to be available (7560).
        IMO you are making more of the second error message than it deserves. The fact that '*main::MM::array_push' is longer than 'eb' accounts for the discrepancy in the available memory.

        I will ask about this on the XS forum.

        cmac
        http://www.animalhead.com