December 2009 Archives

C, Perl, and cut and paste

On all released 5.10.* versions of Perl to date, the smart match operator can segfault if passed recursive data structures (like arrays that contain a reference to themselves). I fixed that. The fix was pretty trivial: basically, the C code in the implementation of smart match was creating two hashes, called seen_this and seen_other; however, a typo made it so only seen_this was actually created. Segfaults ensued if the code was trying to use seen_other. …

About Rafaël Garcia-Suarez

user-pic I can haz Perl.