[parrot/parrot] 03b3d5: frontend: Be pessimistic about arguments
noreply at github.com
Thu Jan 26 05:41:00 UTC 2012
Author: Brian Gernhardt <brian.gernhardt at mail.rit.edu>
Date: 2012-01-25 (Wed, 25 Jan 2012)
frontend: Be pessimistic about arguments
The code to handle -o added two arguments to the final array.
However, longopt allows "-o file" to also be passed as
"--output=file". This causes one argument to cause two to be added.
This means that we can't have the destination array be the same size
as the original.
I've decided to use the most pessimistic case for allocation, one
where every argument causes two to be added (parrot --output=file1
--output=file2 etc). Alternative solutions include passing it as
"-o=file" instead and having prt0 handle breaking it apart, but this
is the fastest way to fix the memory overrun.
More information about the parrot-commits