How to reproduce:
perl6 -e 'use NativeCall; CArray[uint8].new(())'
Fix (not tested):
Thanks for the report!
Unfortunately the fix you provided is a no-op, because empty arrays are falsy, so the check doesn't add anything extra.
The issue was the nextsame candidate was the one with the slurpy that called the current candidate back again, resulting in an infiniloop.
The issue has now been resolved in rakudo/rakudo@804bf67
Tests added in the same commit.