Hi Robert,

On Wed, Jan 24, 2007 at 08:28:11AM +0100, Robert Millan wrote:
> I'm afraid your patch didn't work.  With 2.19-1.1:

> $ makensis /dev/null
> [...]
> Processing plugin dlls: "/usr/share/nsis/Plugins/*.dll"
> Violació de segment

> $ strace makensis /dev/null
> [...]
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x2b2e58091000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x2b2e58091000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x2b2e58092000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x2b2e58093000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
> 0x2b2e58093000

Does the attached patch fix all the problems for you?  It fixes the
segfaults for me with makensis /dev/null, but I haven't tried it with a real
.nsi file.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/
diff -u nsis-2.19/debian/rules nsis-2.19/debian/rules
--- nsis-2.19/debian/rules
+++ nsis-2.19/debian/rules
@@ -20,7 +20,7 @@
 # Anyway, it would be good to make the version indicate the debian revision.
 VERSION=${shell dpkg-parsechangelog | sed -n 's/^Version: *//p'}
 SCONSOPTS=VERSION=$(VERSION) PREFIX=/usr PREFIX_CONF=/etc SKIPPLUGINS=System
-SCONSOPTSALL=$(SCONSOPTS) SKIPDOC=license.txt
+SCONSOPTSALL=$(SCONSOPTS) SKIPDOC=license.txt DEBUG=1
 
 build: patch build-stamp
 build-stamp:
diff -u nsis-2.19/debian/changelog nsis-2.19/debian/changelog
--- nsis-2.19/debian/changelog
+++ nsis-2.19/debian/changelog
@@ -1,3 +1,11 @@
+nsis (2.19-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Enable DEBUG=1 when building, to get the CFLAGS required by policy.
+  * Fix outstanding 64-bit issues in makensis.  Closes: #398421.
+
+ -- Steve Langasek <[EMAIL PROTECTED]>  Thu, 25 Jan 2007 01:33:26 -0800
+
 nsis (2.19-1.1) unstable; urgency=high
 
   * Non-maintainer upload.
diff -u nsis-2.19/debian/patches/series nsis-2.19/debian/patches/series
--- nsis-2.19/debian/patches/series
+++ nsis-2.19/debian/patches/series
@@ -3,0 +4 @@
+64bitness.patch
only in patch2:
unchanged:
--- nsis-2.19.orig/debian/patches/64bitness.patch
+++ nsis-2.19/debian/patches/64bitness.patch
@@ -0,0 +1,23 @@
+diff -u nsis-2.19/Source/Platform.h nsis-2.19/Source/Platform.h
+--- nsis-2.19/Source/Platform.h
++++ nsis-2.19/Source/Platform.h
+@@ -666,7 +666,7 @@
+   WORD e_oemid;

+   WORD e_oeminfo;

+   WORD e_res2[10];

+-  LONG e_lfanew;

++  DWORD e_lfanew;

+ } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;

+ #  pragma pack()

+ #  pragma pack(4)

+--- nsis-2.19.orig/Source/Plugins.cpp
++++ nsis-2.19/Source/Plugins.cpp
+@@ -120,7 +120,7 @@
+         DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);

+         PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);

+         DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames);

+-        unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA);

++        unsigned int *names = (unsigned int*)((unsigned long) exports + (char *) na - ExportDirVA);

+         for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)

+         {

+           const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);

Reply via email to