Nick Wellnhofer created CLOWNFISH-44:
----------------------------------------
Summary: Immutable Strings can be changed from Perl
Key: CLOWNFISH-44
URL: https://issues.apache.org/jira/browse/CLOWNFISH-44
Project: Apache Lucy-Clownfish
Issue Type: Bug
Components: Perl
Reporter: Nick Wellnhofer
Priority: Minor
Perl can hold a reference to a string passed to Clownfish and subsequently
change the string via this reference in a callback. This violates the
assumption that Clownfish strings are immutable and can lead to crashes if the
string buffer is reallocated.
This scenario is somewhat contrived but for a proper fix, I think there's no
other way than to always copy Perl strings passed as arguments. Fortunately,
newer Perls support copy-on-write strings (default since 5.20) which makes this
operation cheap.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)