Coder Social home page Coder Social logo

data-uuid's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data-uuid's Issues

from_string Miss-Parses Spaces

$ perl -MData::UUID -E 'my $u = Data::UUID->new; my $uuid = $u->from_string("91ae3596 95fa 11e4 ab6c 6cff01d6b4db"); say $u->to_string($uuid)'
91AE3596-955F-0A11-E4AB-B60C6CFF01D6

That output should be

91AE3596-95FA-11E4-AB6C-6CFF01D6B4DB

It seems to think the spaces are significant. :-(

Doesn't compile on Win64 Strawberry Perl

Hi! This module fails to install on Win64+Strawberry (latest) either via CPAN or via a make/make install from the command line.

See dump below:

PS D:\Strawberry\cpan\build\Data-UUID-1.220-ldsXib> ls

Directory: D:\Strawberry\cpan\build\Data-UUID-1.220-ldsXib

Mode LastWriteTime Length Name


d---- 14/04/2015 1:46 PM smp-test
d---- 14/04/2015 1:46 PM t
-a--- 16/12/2014 12:05 AM 4773 Changes
-a--- 21/11/2008 9:37 PM 1185 LICENSE
-a--- 14/04/2015 1:46 PM 36771 Makefile.old
-a--- 07/07/2013 4:56 AM 4704 Makefile.PL
-a--- 16/12/2014 12:06 AM 398 MANIFEST
-a--- 16/12/2014 12:06 AM 1099 META.json
-a--- 16/12/2014 12:06 AM 636 META.yml
-a--- 07/07/2013 3:51 AM 5285 ptable.h
-a--- 07/07/2013 4:56 AM 1566 README
-a--- 18/04/2009 8:07 PM 317 typemap
-a--- 16/12/2014 12:01 AM 5244 UUID.h
-a--- 16/12/2014 12:05 AM 4327 UUID.pm
-a--- 16/12/2014 12:01 AM 15263 UUID.xs

PS D:\Strawberry\cpan\build\Data-UUID-1.220-ldsXib> perl .\Makefile.PL
Checking if your kit is complete...
Looks good
Configured options (run perl Makefile.PL --help for how to change this):
UUID state storage: C:\Users\ADMINI1\AppData\Local\Temp
Generating a dmake-style Makefile
Writing Makefile for Data::UUID
Writing MYMETA.yml and MYMETA.json
PS D:\Strawberry\cpan\build\Data-UUID-1.220-ldsXib> dmake
cp UUID.pm blib\lib\Data\UUID.pm
Running Mkbootstrap for Data::UUID ()
"D:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "UUID.bs"
"D:\Strawberry\perl\bin\perl.exe" "D:\Strawberry\perl\lib\ExtUtils\xsubpp" -typemap "D:\STRAWB
1\perl\lib\ExtUtils\type
map" -typemap "typemap" UUID.xs > UUID.xsc && "D:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- UUID.xsc U
UID.c
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY
S -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION="1.220" -DXS_VERSION="1.220"
"-ID:\STRAWB1\perl\lib\CORE" -D_STDIR="C:\Users\ADMINI1\AppData\Local\Temp" -D__MSWin32__ -D_DEFAULT_UMASK=000
7 UUID.c
In file included from D:\STRAWB1\perl\lib\CORE/hv.h:629:0,
from D:\STRAWB
1\perl\lib\CORE/perl.h:3344,
from UUID.xs:2:
D:\STRAWB1\perl\lib\CORE/hv_func.h: In function 'S_perl_hash_murmur3':
D:\STRAWB
1\perl\lib\CORE/hv_func.h:391:17: warning: cast from pointer to integer of different size
In file included from UUID.xs:26:0:
ptable.h: In function 'ptable_find':
ptable.h:107:18: warning: cast from pointer to integer of different size
ptable.h:107:18: warning: cast from pointer to integer of different size
ptable.h:107:18: warning: cast from pointer to integer of different size
ptable.h: In function 'ptable_split':
ptable.h:147:19: warning: cast from pointer to integer of different size
ptable.h:147:19: warning: cast from pointer to integer of different size
ptable.h:147:19: warning: cast from pointer to integer of different size
ptable.h: In function 'ptable_store':
ptable.h:167:20: warning: cast from pointer to integer of different size
ptable.h:167:20: warning: cast from pointer to integer of different size
ptable.h:167:20: warning: cast from pointer to integer of different size
UUID.xs: In function 'inc':
UUID.xs:34:16: warning: cast from pointer to integer of different size
UUID.xs:36:5: warning: cast to pointer from integer of different size
UUID.xs: In function 'XS_Data__UUID_new':
UUID.xs:385:4: warning: cast to pointer from integer of different size
UUID.c: In function 'XS_Data__UUID_create':
UUID.c:573:13: warning: cast to pointer from integer of different size
UUID.c: In function 'XS_Data__UUID_create_from_name':
UUID.c:635:13: warning: cast to pointer from integer of different size
UUID.c: In function 'XS_Data__UUID_compare':
UUID.c:681:13: warning: cast to pointer from integer of different size
UUID.c: In function 'XS_Data__UUID_to_string':
UUID.c:722:13: warning: cast to pointer from integer of different size
UUID.c: In function 'XS_Data__UUID_from_string':
UUID.c:760:13: warning: cast to pointer from integer of different size
UUID.c: In function 'XS_Data__UUID_DESTROY':
UUID.c:859:13: warning: cast to pointer from integer of different size
UUID.xs:581:12: warning: cast from pointer to integer of different size
UUID.xs:583:4: warning: cast to pointer from integer of different size
"D:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists
-e "Mksymlists('NAME'=>"Data::UUID", 'DLBASE' => 'UUID', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { },
'DL_VARS' => []);"
dlltool --def UUID.def --output-exp dll.exp
g++ -o blib\arch\auto\Data\UUID\UUID.xs.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"D:\STRAWB1\perl\lib\CORE" -L"D:\ST
RAWB
1\c\lib" UUID.o "D:\STRAWB~1\perl\lib\CORE\libperl520.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomd
lg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lco
mctl32 dll.exp
D:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of
input file UUID.o' is incompatible with i386:x86-64 output D:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input filedll.exp' is incompatible with i386:x86-64 output
UUID.o:UUID.c:(.text+0x4a): undefined reference to __imp__Perl_croak_nocontext' UUID.o:UUID.c:(.text+0x83): undefined reference to_sprintf'
UUID.o:UUID.c:(.text+0xb8): undefined reference to _sprintf' UUID.o:UUID.c:(.text+0xda): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0xed): undefined reference to __imp__Perl_newSVpv' UUID.o:UUID.c:(.text+0xfe): undefined reference to__imp__Perl_sv_2mortal'
UUID.o:UUID.c:(.text+0x25f): undefined reference to _sprintf' UUID.o:UUID.c:(.text+0x294): undefined reference to_sprintf'
UUID.o:UUID.c:(.text+0x2d5): undefined reference to __imp__Perl_get_context' UUID.o:UUID.c:(.text+0x35f): undefined reference to__imp__Perl_sv_2pv_flags'
UUID.o:UUID.c:(.text+0x39e): undefined reference to __imp__Perl_sv_derived_from' UUID.o:UUID.c:(.text+0x3ef): undefined reference to__imp__Perl_sv_2iv_flags'
UUID.o:UUID.c:(.text+0x40e): undefined reference to __imp__Perl_croak_nocontext' UUID.o:UUID.c:(.text+0x44f): undefined reference to_sscanf'
UUID.o:UUID.c:(.text+0x636): undefined reference to __imp__Perl_croak_nocontext' UUID.o:UUID.c:(.text+0x643): undefined reference to__imp__Perl_croak_nocontext'
UUID.o:UUID.c:(.text+0x654): undefined reference to __imp__Perl_croak_xs_usage' UUID.o:UUID.c:(.text+0x666): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0x6eb): undefined reference to __imp__Perl_sv_2pv_flags' UUID.o:UUID.c:(.text+0x727): undefined reference to__imp__Perl_sv_derived_from'
UUID.o:UUID.c:(.text+0x775): undefined reference to __imp__Perl_sv_2iv_flags' UUID.o:UUID.c:(.text+0x7e1): undefined reference to__imp__Perl_croak_nocontext'
UUID.o:UUID.c:(.text+0x7f2): undefined reference to __imp__Perl_croak_xs_usage' UUID.o:UUID.c:(.text+0x802): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0x884): undefined reference to __imp__Perl_sv_2pv_flags' UUID.o:UUID.c:(.text+0x8d5): undefined reference to__imp__Perl_sv_2pv_flags'
UUID.o:UUID.c:(.text+0x93c): undefined reference to __imp__Perl_sv_derived_from' UUID.o:UUID.c:(.text+0x98d): undefined reference to__imp__Perl_sv_2iv_flags'
UUID.o:UUID.c:(.text+0xa28): undefined reference to __imp__Perl_sv_setiv' UUID.o:UUID.c:(.text+0xa44): undefined reference to__imp__Perl_mg_set'
UUID.o:UUID.c:(.text+0xa70): undefined reference to __imp__Perl_sv_newmortal' UUID.o:UUID.c:(.text+0xaba): undefined reference to__imp__Perl_croak_nocontext'
UUID.o:UUID.c:(.text+0xace): undefined reference to __imp__Perl_croak_xs_usage' UUID.o:UUID.c:(.text+0xadf): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0xaee): undefined reference to __imp__Perl_push_scope' UUID.o:UUID.c:(.text+0xb04): undefined reference to__imp__Perl_save_strlen'
UUID.o:UUID.c:(.text+0xb6d): undefined reference to __imp__Perl_newSVpv' UUID.o:UUID.c:(.text+0xb82): undefined reference to__imp__Perl_sv_2mortal'
UUID.o:UUID.c:(.text+0xba4): undefined reference to __imp__Perl_call_method' UUID.o:UUID.c:(.text+0xbc2): undefined reference to__imp__Perl_newSVsv'
UUID.o:UUID.c:(.text+0xbf3): undefined reference to __imp__Perl_pop_scope' UUID.o:UUID.c:(.text+0xc0b): undefined reference to__imp__Perl_free_tmps'
UUID.o:UUID.c:(.text+0xc33): undefined reference to __imp__Perl_stack_grow' UUID.o:UUID.c:(.text+0xc47): undefined reference to__imp__Perl_markstack_grow'
UUID.o:UUID.c:(.text+0xc59): undefined reference to __imp__Perl_croak_nocontext' UUID.o:UUID.c:(.text+0xc71): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0xc80): undefined reference to __imp__Perl_push_scope' UUID.o:UUID.c:(.text+0xc96): undefined reference to__imp__Perl_save_strlen'
UUID.o:UUID.c:(.text+0xd1e): undefined reference to __imp__Perl_call_method' UUID.o:UUID.c:(.text+0xd42): undefined reference to__imp__Perl_free_tmps'
UUID.o:UUID.c:(.text+0xd4d): undefined reference to __imp__Perl_pop_scope' UUID.o:UUID.c:(.text+0xd83): undefined reference to__imp__Perl_stack_grow'
UUID.o:UUID.c:(.text+0xdaf): undefined reference to __imp__Perl_stack_grow' UUID.o:UUID.c:(.text+0xdc3): undefined reference to__imp__Perl_markstack_grow'
UUID.o:UUID.c:(.text+0xddd): undefined reference to __imp__Perl_get_context' UUID.o:UUID.c:(.text+0xdec): undefined reference to__imp__Perl_push_scope'
UUID.o:UUID.c:(.text+0xe02): undefined reference to __imp__Perl_save_strlen' UUID.o:UUID.c:(.text+0xe62): undefined reference to__imp__Perl_sv_2mortal'
UUID.o:UUID.c:(.text+0xe84): undefined reference to __imp__Perl_call_method' UUID.o:UUID.c:(.text+0xec6): undefined reference to__imp__Perl_sv_2pv_flags'
UUID.o:UUID.c:(.text+0xf0b): undefined reference to __imp__Perl_pop_scope' UUID.o:UUID.c:(.text+0xf1f): undefined reference to__imp__Perl_free_tmps'
UUID.o:UUID.c:(.text+0xf57): undefined reference to __imp__Perl_stack_grow' UUID.o:UUID.c:(.text+0xf6b): undefined reference to__imp__Perl_markstack_grow'
UUID.o:UUID.c:(.text+0xf7d): undefined reference to __imp__Perl_croak_nocontext' UUID.o:UUID.c:(.text+0xf8a): undefined reference to__imp__Perl_croak_nocontext'
UUID.o:UUID.c:(.text+0xf9e): undefined reference to __imp__Perl_get_context' UUID.o:UUID.c:(.text+0x1023): undefined reference to__imp__Perl_sv_2pv_flags'
UUID.o:UUID.c:(.text+0x106b): undefined reference to __imp__Perl_sv_derived_from' UUID.o:UUID.c:(.text+0x10b9): undefined reference to__imp__Perl_sv_2iv_flags'
UUID.o:UUID.c:(.text+0x114d): undefined reference to __imp__Perl_newSVpv' UUID.o:UUID.c:(.text+0x1260): undefined reference to__imp__Perl_croak_nocontext'
UUID.o:UUID.c:(.text+0x1271): undefined reference to __imp__Perl_croak_xs_usage' UUID.o:UUID.c:(.text+0x1288): undefined reference to_QueryPerformanceCounter@4'
UUID.o:UUID.c:(.text+0x137d): undefined reference to __imp__Perl_get_context' UUID.o:UUID.c:(.text+0x13f4): undefined reference to__imp__Perl_sv_derived_from'
UUID.o:UUID.c:(.text+0x1445): undefined reference to __imp__Perl_sv_2iv_flags' UUID.o:UUID.c:(.text+0x147f): undefined reference to_rand'
UUID.o:UUID.c:(.text+0x169b): undefined reference to _srand' UUID.o:UUID.c:(.text+0x16b7): undefined reference to__imp__Perl_croak_nocontext'
UUID.o:UUID.c:(.text+0x16c8): undefined reference to __imp__Perl_croak_xs_usage' UUID.o:UUID.c:(.text+0x1760): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0x1904): undefined reference to __imp__PL_memory_wrap' UUID.o:UUID.c:(.text+0x1915): undefined reference to__imp__Perl_croak_nocontext'
UUID.o:UUID.c:(.text+0x1926): undefined reference to __imp__Perl_get_context' UUID.o:UUID.c:(.text+0x198f): undefined reference to__imp__Perl_sv_derived_from'
UUID.o:UUID.c:(.text+0x19da): undefined reference to __imp__Perl_sv_2iv_flags' UUID.o:UUID.c:(.text+0x19e8): undefined reference to_EnterCriticalSection@4'
UUID.o:UUID.c:(.text+0x1a6c): undefined reference to _LeaveCriticalSection@4' UUID.o:UUID.c:(.text+0x1b6e): undefined reference to_LeaveCriticalSection@4'
UUID.o:UUID.c:(.text+0x1b81): undefined reference to __imp__Perl_croak_nocontext' UUID.o:UUID.c:(.text+0x1b95): undefined reference to__imp__Perl_croak_xs_usage'
UUID.o:UUID.c:(.text+0x1bc0): undefined reference to __imp__Perl_get_context' UUID.o:UUID.c:(.text+0x1be7): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0x1c22): undefined reference to _EnterCriticalSection@4' UUID.o:UUID.c:(.text+0x1c84): undefined reference to_LeaveCriticalSection@4'
UUID.o:UUID.c:(.text+0x1cb6): undefined reference to __imp__Perl_croak_xs_usage' UUID.o:UUID.c:(.text+0x1cca): undefined reference to__imp__Perl_get_context'
UUID.o:UUID.c:(.text+0x1e92): undefined reference to __errno' UUID.o:UUID.c:(.text+0x1ea4): undefined reference to_EnterCriticalSection@4'
UUID.o:UUID.c:(.text+0x1ec7): undefined reference to _LeaveCriticalSection@4' UUID.o:UUID.c:(.text+0x1eed): undefined reference to__imp__Perl_sv_newmortal'
UUID.o:UUID.c:(.text+0x1f24): undefined reference to __imp__Perl_sv_setref_pv' UUID.o:UUID.c:(.text+0x1f46): undefined reference to_GlobalMemoryStatus@4'
UUID.o:UUID.c:(.text+0x1f52): undefined reference to _GetSystemInfo@4' UUID.o:UUID.c:(.text+0x1f5e): undefined reference to_GetSystemTimeAsFileTime@4'
UUID.o:UUID.c:(.text+0x1f6a): undefined reference to _QueryPerformanceCounter@4' UUID.o:UUID.c:(.text+0x1f70): undefined reference to_GetTickCount@0'
UUID.o:UUID.c:(.text+0x1f8c): undefined reference to _GetComputerNameA@8' UUID.o:UUID.c:(.text+0x1fb1): undefined reference to__imp__Perl_newSVpv'
UUID.o:UUID.c:(.text+0x1fc2): undefined reference to __imp__Perl_sv_2mortal' UUID.o:UUID.c:(.text+0x2109): undefined reference to__imp__Perl_croak_xs_usage'
UUID.o:UUID.c:(.text+0x211b): undefined reference to __imp__Perl_get_context' UUID.o:UUID.c:(.text+0x2175): undefined reference to__imp__Perl_xs_apiversion_bootcheck'
UUID.o:UUID.c:(.text+0x2198): undefined reference to __imp__Perl_xs_version_bootcheck' UUID.o:UUID.c:(.text+0x21bb): undefined reference to__imp__Perl_newXS'
UUID.o:UUID.c:(.text+0x24b5): undefined reference to __imp__Perl_gv_stashpv' UUID.o:UUID.c:(.text+0x252e): undefined reference to_InitializeCriticalSection@4'
UUID.o:UUID.c:(.text+0x254a): undefined reference to __imp__Perl_newSVpv' UUID.o:UUID.c:(.text+0x256c): undefined reference to__imp__Perl_newCONSTSUB'
UUID.o:UUID.c:(.text+0x2639): undefined reference to `__imp__Perl_call_list'
collect2.exe: error: ld returned 1 exit status
dmake.exe: Error code 129, while making 'blib\arch\auto\Data\UUID\UUID.xs.dll'

Licence clarification

In META.json is:

   "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
   "license" : [
      "bsd"
   ],

and in LICENSE file definitely part:

 ** To anyone who acknowledges that this file is provided "AS IS"
 ** without any express or implied warranty: permission to use, copy,
 ** modify, and distribute this file for any purpose is hereby
 ** granted without fee, provided that the above copyright notices and
 ** this notice appears in all source code copies, and that none of
 ** the names of Open Software Foundation,

Is not BSD but looks like MIT license

Can't build on Windows strawberry-perl-5.26.0 32/64bit

Hi,
Data::UUID is essential for CPAN Tester Reporter modules.
So I can't automatically report CPAN test results.

I have got the following errors on Windows strawberry-perl-5.26.0 32/64bit.
@kmx

 Writing Makefile for Data::UUID
Writing MYMETA.yml and MYMETA.json
(C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe Makefile.PL exited with 0)
  C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe Makefile.PL -- OK
Running make for R/RJ/RJBS/Data-UUID-1.221.tar.gz

cp UUID.pm blib\lib\Data\UUID.pm
Running Mkbootstrap for UUID ()
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "UUID.bs"
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- UUID.bs blib\arch\auto\Data\UUID\UUID.bs 644
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" "C:\strawberry-perl-5.26-32bit\perl\lib\ExtUtils/xsubpp"  -typemap C:\strawberry-perl-5.26-32bit\perl\lib\ExtUtils\typemap -typemap C:\strawberry-perl-5.26-32bit\cpan\build\Data-UUID-1.221-1\typemap  UUID.xs > UUID.xsc
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" -MExtUtils::Command -e mv -- UUID.xsc UUID.c
gcc -c   -s -O2 -DWIN32 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"1.221\" -DXS_VERSION=\"1.221\"  "-IC:\strawberry-perl-5.26-32bit\perl\lib\CORE"  -D_STDIR=\"C:\\Users\\kang\\AppData\\Local\\Temp\" -D__MSWin32__ -D_DEFAULT_UMASK=0007 UUID.c
UUID.xs: In function 'inc':
UUID.xs:36:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     ptable_store(instances, ent->key, (void *)++count);
                                       ^
UUID.xs:28:63: note: in definition of macro 'ptable_store'
 # define ptable_store(T, K, V)  ptable_store(aTHX_ (T), (K), (V))
                                                               ^
UUID.xs: In function 'XS_Data__UUID_new':
UUID.xs:359:45: error: incomplete universal character name \U
    if ((fd = fopen(UUID_STATE_NV_STORE, "rb"))) {
                                             ^
UUID.xs:359:45: warning: unknown escape sequence: '\k'
UUID.xs:359:45: warning: unknown escape sequence: '\A'
UUID.xs:359:45: warning: unknown escape sequence: '\L'
UUID.xs:359:45: warning: unknown escape sequence: '\T'
UUID.xs:365:46: error: incomplete universal character name \U
    if ((fd = fopen(UUID_NODEID_NV_STORE, "rb"))) {
                                              ^
UUID.xs:365:46: warning: unknown escape sequence: '\k'
UUID.xs:365:46: warning: unknown escape sequence: '\A'
UUID.xs:365:46: warning: unknown escape sequence: '\L'
UUID.xs:365:46: warning: unknown escape sequence: '\T'
UUID.xs:376:49: error: incomplete universal character name \U
       if ((fd = fopen(UUID_NODEID_NV_STORE, "wb"))) {
                                                 ^
UUID.xs:376:49: warning: unknown escape sequence: '\k'
UUID.xs:376:49: warning: unknown escape sequence: '\A'
UUID.xs:376:49: warning: unknown escape sequence: '\L'
UUID.xs:376:49: warning: unknown escape sequence: '\T'
UUID.xs: In function 'XS_Data__UUID_create':
UUID.xs:420:47: error: incomplete universal character name \U
       if((fd = fopen(UUID_STATE_NV_STORE, "wb"))) {
                                               ^
UUID.xs:420:47: warning: unknown escape sequence: '\k'
UUID.xs:420:47: warning: unknown escape sequence: '\A'
UUID.xs:420:47: warning: unknown escape sequence: '\L'
UUID.xs:420:47: warning: unknown escape sequence: '\T'
UUID.xs: In function 'XS_Data__UUID_DESTROY':
UUID.xs:583:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    ptable_store(instances, self, (void *)count);
                                  ^
UUID.xs:28:63: note: in definition of macro 'ptable_store'
 # define ptable_store(T, K, V)  ptable_store(aTHX_ (T), (K), (V))
                                                               ^
UUID.xs:587:48: error: incomplete universal character name \U
       if ((fd = fopen(UUID_STATE_NV_STORE, "wb"))) {
                                                ^
UUID.xs:587:48: warning: unknown escape sequence: '\k'
UUID.xs:587:48: warning: unknown escape sequence: '\A'
UUID.xs:587:48: warning: unknown escape sequence: '\L'
UUID.xs:587:48: warning: unknown escape sequence: '\T'
gmake: *** [Makefile:343: UUID.o] Error 1
(C:\strawberry-perl-5.26-32bit\c\bin\gmake.exe exited with 512)

CVE-2013-4184: Insecure usage of /tmp/.UUID_STATE and /tmp/.UUID_NODEID

This is a repost and update of https://rt.cpan.org/Public/Bug/Display.html?id=69277 - the bug tracker that CPAN points to appears to have changed at some point since 2011.

A symlink attack via Data::UUID is possible.

As user2:

ln -s /home/user1/test-file /tmp/.UUID_STATE

As user1:

perl -MData::UUID -e 'Data::UUID->new'

Then /home/user1/test-file is overwritten.

There are two points in UUID.xs which write to UUID_STATE_NV_STORE - both the DESTROY() and create() functions are affected.

On at least recent Debian kernels, it is necessary to disable symlink protection via "sysctl fs.protected_symlinks=0" to reproduce this issue.

A similar attack is possible via .UUID_NODEID, but only if combined with exploiting the race condition between fopen and fwrite, so this is much more difficult to reproduce.

support for v5 SHA1 UUID

Using SHA-1 reduces the probability of collisions and provides a better randomness of the resulting UUID compared to V3. Can we have support for V5 UUID in Data::UUID ?

v4 vs v3 UUID on AWSLinux & CentOS

On AWSLinux (2014.09), this perl module used to generate v4 UUIDs using $ug->to_string( $ug->create()) but something changed in mid-2014 and now it only generates v3's. http://search.cpan.org/~rjbs/Data-UUID-1.220/UUID.pm used to state that it generates v4 but now it says v3!

On CentOS (6.5) Data::UUID still generates v4 using $ug->to_string( $ug->create()) !!

I'm not sure what's going on here!

Install failed on Windows 64bit with strawberry Perl 5.28

Running install for module 'Data::GUID'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RJ/RJBS/Data-GUID-0.049.tar.gz
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RJ/RJBS/CHECKSUMS
Checksum for C:\STRAWB~1\cpan\sources\authors\id\R\RJ\RJBS\Data-GUID-0.049.tar.gz ok
Configuring R/RJ/RJBS/Data-GUID-0.049.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Data::UUID 1.148 not found.
Generating a gmake-style Makefile
Writing Makefile for Data::GUID
Writing MYMETA.yml and MYMETA.json
  RJBS/Data-GUID-0.049.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for R/RJ/RJBS/Data-GUID-0.049.tar.gz
---- Unsatisfied dependencies detected during ----
----        RJBS/Data-GUID-0.049.tar.gz       ----
    Data::UUID [requires]
Running install for module 'Data::UUID'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/R/RJ/RJBS/Data-UUID-1.221.tar.gz
Checksum for C:\STRAWB~1\cpan\sources\authors\id\R\RJ\RJBS\Data-UUID-1.221.tar.gz ok
Configuring R/RJ/RJBS/Data-UUID-1.221.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Configured options (run perl Makefile.PL --help for how to change this):
        UUID state storage: C:\Users\ITCHAR~1\AppData\Local\Temp\2
Generating a gmake-style Makefile
Writing Makefile for Data::UUID
Writing MYMETA.yml and MYMETA.json
  RJBS/Data-UUID-1.221.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for R/RJ/RJBS/Data-UUID-1.221.tar.gz
cp UUID.pm blib\lib\Data\UUID.pm
Running Mkbootstrap for UUID ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "UUID.bs"
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- UUID.bs blib\arch\auto\Data\UUID\UUID.bs 644
"C:\Strawberry\perl\bin\perl.exe" "C:\Strawberry\perl\lib\ExtUtils/xsubpp"  -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap -typemap C:\STRAWB~1\cpan\build\Data-UUID-1.221-0\typemap  UUID.xs > UUID.xsc
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- UUID.xsc UUID.c
gcc -c   -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"1.221\" -DXS_VERSION=\"1.221\"  "-IC:\STRAWB~1\perl\lib\CORE"  -D_STDIR=\"C:\\Users\\ITCHAR~1\\AppData\\Local\\Temp\\2\" -D__MSWin32__ -D_DEFAULT_UMASK=0007 UUID.c
UUID.xs: In function 'XS_Data__UUID_new':
UUID.xs:359:45: error: incomplete universal character name \U
    if ((fd = fopen(UUID_STATE_NV_STORE, "rb"))) {
                                             ^
UUID.xs:359:45: warning: unknown escape sequence: '\I'
UUID.xs:359:45: warning: unknown escape sequence: '\A'
UUID.xs:359:45: warning: unknown escape sequence: '\L'
UUID.xs:359:45: warning: unknown escape sequence: '\T'
UUID.xs:365:46: error: incomplete universal character name \U
    if ((fd = fopen(UUID_NODEID_NV_STORE, "rb"))) {
                                              ^
UUID.xs:365:46: warning: unknown escape sequence: '\I'
UUID.xs:365:46: warning: unknown escape sequence: '\A'
UUID.xs:365:46: warning: unknown escape sequence: '\L'
UUID.xs:365:46: warning: unknown escape sequence: '\T'
UUID.xs:376:49: error: incomplete universal character name \U
       if ((fd = fopen(UUID_NODEID_NV_STORE, "wb"))) {
                                                 ^
UUID.xs:376:49: warning: unknown escape sequence: '\I'
UUID.xs:376:49: warning: unknown escape sequence: '\A'
UUID.xs:376:49: warning: unknown escape sequence: '\L'
UUID.xs:376:49: warning: unknown escape sequence: '\T'
UUID.xs: In function 'XS_Data__UUID_create':
UUID.xs:420:47: error: incomplete universal character name \U
       if((fd = fopen(UUID_STATE_NV_STORE, "wb"))) {
                                               ^
UUID.xs:420:47: warning: unknown escape sequence: '\I'
UUID.xs:420:47: warning: unknown escape sequence: '\A'
UUID.xs:420:47: warning: unknown escape sequence: '\L'
UUID.xs:420:47: warning: unknown escape sequence: '\T'
UUID.xs: In function 'XS_Data__UUID_DESTROY':
UUID.xs:587:48: error: incomplete universal character name \U
       if ((fd = fopen(UUID_STATE_NV_STORE, "wb"))) {
                                                ^
UUID.xs:587:48: warning: unknown escape sequence: '\I'
UUID.xs:587:48: warning: unknown escape sequence: '\A'
UUID.xs:587:48: warning: unknown escape sequence: '\L'
UUID.xs:587:48: warning: unknown escape sequence: '\T'
gmake: *** [Makefile:343: UUID.o] Error 1
  RJBS/Data-UUID-1.221.tar.gz
  C:\STRAWB~1\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'Data::UUID'.
Failed during this command:
 RJBS/Data-UUID-1.221.tar.gz                  : make NO

Duplicate UUIDs are generated after forking

As demonstrated in this blog post, it appears duplicate UUIDs can be generated after forking:

$ perl -MData::UUID -E'$u = Data::UUID->new(); my $parent = $$; $parent == $$ && fork for 1..shift; say $u->create_str' 1000 | sort | uniq -c | grep -v '^\s*1\s'
      2 02B8AAEE-9513-11E8-ABC7-22474D6EA9B9
      2 02B8FA58-9513-11E8-93A0-22474D6EA9B9
      2 02BDCE98-9513-11E8-BF6D-22474D6EA9B9
      2 02BDDCB2-9513-11E8-BFBF-22474D6EA9B9
      2 02BF0C54-9513-11E8-98FC-22474D6EA9B9
      2 02C08688-9513-11E8-84BD-22474D6EA9B9
      2 02C0E2EA-9513-11E8-8793-22474D6EA9B9
      2 02C29D24-9513-11E8-A059-22474D6EA9B9
      2 02C5DE26-9513-11E8-A9C4-22474D6EA9B9

I take no credit for discovering this. I am just opening the issue as I didn't see one already.

Data::UUID->new->from_string(4) doesn't always throw an error.

$ perl -MData::UUID -e'
    my $x = "12345678901234567890123456789012";
    print Data::UUID->new->from_string($x), "\n";
    $x = 4;
    print Data::UUID->new->from_string($x), "\n";
    print "done\n";
'
xV4▒V4x▒4Vx▒
xV4▒V4x▒4Vx▒
done

That's wrong. If I change C<< $x = 4; >> to C<< undef $x; $x = 4; >>, an error is correctly reported.

xV4▒V4x▒4Vx▒
from_string(4) failed...

Binary representation of UUID incorrect

Conversion of string to binary, and then back from binary to string works correctly when both conversions are made using the Data::UUID module. However the binary representation is not compatible with other libraries. When the string
41324657-9abb-401c-8533-745846b948f7
is converted to binary, the command
od -t x1
shows the binary as
57 46 32 41 bb 9a 1c 40 85 33 74 58 46 b9 48 f7
The left portion of the bytes are transformed.
Using the module UUID::Tiny, the od -t x1 output matches the string:
41 32 46 57 9a bb 40 1c 85 33 74 58 46 b9 48 f7

compile Data::UUID on intel mac using older xcode cmdline tools.

I'm using an older intel 32 bit imac, so I can't go to the latest and greatest xcode because of architecture. I do in fact have gcc 4.2.1, but can not seem to get Data::UUID to install as part of Metabase::Resource which is needed to get a smoker up and running.

I have tried aliasing and symlinking gcc-4.2 with the gcc binary in system path, but then I get an error about an issue of not knowing the architecture output (i can add this detail if there is interest)

I'm creating this ticket because I'd like to make this machine a smoker and can't do it without Data::UUID.

Thanks,.
--dave

gcc --version
i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

Configuring Data-UUID-1.219
Running Makefile.PL
Checking if your kit is complete...
Looks good
Configured options (run perl Makefile.PL --help for how to change this):
UUID state storage: /var/folders/Xo/Xo5PLtJsF0OAdNYo8F6LYE+++TI/-Tmp-
default umask: 0007
Generating a Unix-style Makefile
Writing Makefile for Data::UUID
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.98)
Checking if you have Digest::MD5 0 ... Yes (2.36_01)
Building and testing Data-UUID-1.219
cp UUID.pm blib/lib/Data/UUID.pm
Running Mkbootstrap for Data::UUID ()
chmod 644 UUID.bs
/usr/bin/perl /Library/Perl/Updates/5.10.0/ExtUtils/xsubpp -typemap /System/Library/Perl/5.10.0/ExtUtils/typemap -typemap typemap UUID.xs > UUID.xsc && mv UUID.xsc UUID.c
gcc-4.2 -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -Os -DVERSION="1.219" -DXS_VERSION="1.219" "-I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE" -D_STDIR="/var/folders/Xo/Xo5PLtJsF0OAdNYo8F6LYE+++TI/-Tmp-" -D__darwin__ -D_DEFAULT_UMASK=0007 UUID.c
/bin/sh: gcc-4.2: command not found
make: *** [UUID.o] Error 127
-> FAIL Installing Data::UUID failed. See /Users/dhorner/.cpanm/work/1406480173.42376/build.log for details. Retry with --force to force install it.
-> FAIL Installing the dependencies failed: Module 'Data::UUID' is not installed
-> FAIL Bailing out the installation for Data-GUID-0.048.
-> FAIL Installing the dependencies failed: Module 'Data::GUID' is not installed
-> FAIL Bailing out the installation for Metabase-Fact-0.024.

Segmentation fault

On an Ubuntu 22.04.0 with perl v5.32 or v5.36, caching and re-using the Data::UUID object creates a segmentation fault.
I spent hours to find out where the segmentation fault came from.
I think it is important to highlight in the documentation to always create a new instance for each new UUID created.

Cannot compile on Haiku OS with gcc 7

gcc -c -fwrapv -fno-strict-aliasing -pipe -D_FORTIFY_SOURCE=2 -O -DVERSION="1.221" -DXS_VERSION="1.221" -fpic "-I/packages/perl-5.26.1-2/.self/lib/perl5/5.26.1/x86_64-haiku/CORE" -D_STDIR="/tmp" -D__haiku__ -D_DEFAULT_UMASK=0007 UUID.c
In file included from UUID.xs:8:0:
/boot/system/develop/headers/os/kernel/OS.h:349:8: error: unknown type name 'bool'
extern bool has_data(thread_id thread);
^~~~
/boot/system/develop/headers/os/kernel/OS.h:425:2: error: unknown type name 'bool'
bool enabled;
^~~~
In file included from UUID.xs:2:0:
UUID.xs: In function 'MD5Init':

The problem appears because UUID.xs explicitly undefines bool for HAIKU. The patch is incoming.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.