Skip Menu |
 

This queue is for tickets about the Crypt-Blowfish CPAN distribution.

Report information
The Basics
Id: 55173
Status: resolved
Priority: 0/
Queue: Crypt-Blowfish

People
Owner: DPARIS [...] cpan.org
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Warnings on Windows 64bit - mingw-w64 compiler
Hi,

when trying to compile Crypt::Blowfish on 64bit MS Windows (gcc-4.4.3 toolchain by mingw-w64.sf.net) I got the following errors:

gcc -c  -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"2.11\"    -DXS_VERSION=\"2.11\"  "-IC:\strawberry64\perl\lib\CORE"   _blowfish.c
_blowfish.c: In function 'crypt_block':
_blowfish.c:345: warning: cast from pointer to integer of different size
_blowfish.c:345: warning: cast to pointer from integer of different size
...
+ many similar on lines 345, 346, 347, 348, 349, 350, 351, 352

The point is that on 64bit MS Windows there is:
- size of int = 4 bytes (!!!)
- size of *void = 8 bytes

So casting between integer and pointer is not generally safe.

In the end Crypt::Blowfish compiles + pass all tests, however the above mentioned warnings are IMHO worth fixing.

--
kmx
Subject: Re: [rt.cpan.org #55173] Warnings on Windows 64bit - mingw-w64 compiler
Date: Thu, 04 Mar 2010 20:24:54 +0000
To: bug-Crypt-Blowfish [...] rt.cpan.org
From: Dave Paris <dparis [...] w3works.com>
Download (untitled) / with headers
text/plain 1.8k
After investigating this, I will not be able to patch this quickly until I get a 64-bit Windows platform. However, tested patches will be graciously (and gratefully) accepted, applied, and build-tested on other platforms. Agreed that it worth fixing, but as this is not a show-stopper or known to be attackable, it is a lower priority fix. Should this change, the priority of any fixes will be adjusted immediately. Thank you, -dsp On 3/3/2010 9:18 AM, kmx via RT wrote: Show quoted text
> Wed Mar 03 04:18:07 2010: Request 55173 was acted upon. > Transaction: Ticket created by KMX > Queue: Crypt-Blowfish > Subject: Warnings on Windows 64bit - mingw-w64 compiler > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: kmx@cpan.org > Status: new > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=55173> > > > Hi, > > when trying to compile Crypt::Blowfish on 64bit MS Windows (gcc-4.4.3 toolchain > by mingw-w64.sf.net) I got the following errors: > > gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields > -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"2.11\" -DXS_VERSION=\"2.11\" > "-IC:\strawberry64\perl\lib\CORE" _blowfish.c > _blowfish.c: In function 'crypt_block': > _blowfish.c:345: warning: cast from pointer to integer of different size > _blowfish.c:345: warning: cast to pointer from integer of different size > ... > + many similar on lines 345, 346, 347, 348, 349, 350, 351, 352 > > The point is that on 64bit MS Windows there is: > - size of int = 4 bytes (!!!) > - size of *void = 8 bytes > > So casting between integer and pointer is not generally safe. > > In the end Crypt::Blowfish compiles + pass all tests, however the above > mentioned warnings are IMHO worth fixing. > > -- > kmx >
Dne Čt 04.bře.2010 15:14:47, dparis@w3works.com napsal(a):
Show quoted text
> After investigating this, I will not be able to patch this quickly
> until I get a 64-bit Windows platform. However, tested patches
> will be graciously (and gratefully) accepted, applied, and
>build-tested on other platforms.

Hi,

with the following patch Crypt-Blowfish builds (+all tests pass) on both 32bit/64bit MS Windows without any warning.

--
kmx

--- Crypt-Blowfish-2.12.orig\_blowfish.c
+++ Crypt-Blowfish-2.12\_blowfish.c
@@ -28,7 +28,11 @@

 /* Define IntP to be an integer which
    is the same size as a pointer. */
+#ifdef _WIN64
+typedef unsigned long long IntP ;
+#else
 typedef unsigned long IntP ;
+#endif


Hi Dave,

can I help somehow with getting the patch from my previous post into Crypt-Blowfish release?

--
kmx
Hi Dave,

would it be possible to move this issue forward in any way?

I am even ready to volunteer and prepare a new release (if you give me co-maint + tell me where is the src code repo).

--
kmx

This ticket has been resolved in release 2.13 which has been uploaded to PAUSE. -dsp


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.