Christoph Otto (via RT) wrote:

I was looking at #45357 ([TODO] Which exception should be thrown with register overflow?) and found that Parrot doesn't like subs with more than 205 params. This seems like a perfectly reasonable limit, but perhaps the behavior could be more user-friendly.* Maybe an EXCEPTION_ERR_OVERFLOW should be thrown here instead?

Using the attached patch to reproduce:
$ perl mktoomanyargs.pl>toomanyargs.pir && ./parrot toomanyargs.pir
Segmentation fault (core dumped)


*On the other hand, we may choose to be overtly hostile to users who do things like call subs with 206 parameters. It's a design decision.

It certainly shouldn't segfault. But, the question is: why does it segfault at 206 parameters? Throwing an exception to avoid an error we don't understand isn't good for the long-term health of the VM.

Allison

Reply via email to