[ 
https://issues.apache.org/jira/browse/CLOWNFISH-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15228059#comment-15228059
 ] 

Nick Wellnhofer commented on CLOWNFISH-77:
------------------------------------------

What probably happens:

- {{t/051-symbol.t}} calls {{Clownfish::CFC::Model::Symbol->new( name => 
"\x\{263a\}" )}}.
- {{CFCSymbol_new}} receives the UTF-8 sequence {{"\xE2\x98\xBA"}}, or as a 
(signed) char array {{\{-30, -104, -70\}}}.
- {{S_validate_identifier}} calls {{isalpha(-30)}}.

The last step causes undefined behavior (the argument to the {{ctype.h}} 
functions must be representable as an unsigned char or must equal the value of 
the macro EOF).

The ctype functions are also affected by the current locale. It's probably best 
to use custom wrappers.

> Failed test 'reject bad name' on Strawberry Perl
> ------------------------------------------------
>
>                 Key: CLOWNFISH-77
>                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-77
>             Project: Apache Lucy-Clownfish
>          Issue Type: Bug
>          Components: Compiler, Perl
>            Reporter: Nick Wellnhofer
>            Priority: Minor
>             Fix For: 0.5.1
>
>
> CPAN Testers report mysterious failures in {{t/051-symbol.t}}:
> http://www.cpantesters.org/cpan/report/bec79c72-6c05-1014-86de-e9c82c7077ee
> http://www.cpantesters.org/cpan/report/18238ebb-6bf5-1014-8e05-6eefb4e47126
> http://www.cpantesters.org/cpan/report/78e75295-6bf3-1014-881c-92c1e2bd6d6a
> http://www.cpantesters.org/cpan/report/3ce76138-6c0e-1014-b7e5-ea2b12209c7f
> All reports are from Strawberry Perl.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to