File to Patch? (Heap-related)

Questions about Wine on Linux
Locked
Xol
Level 1
Level 1
Posts: 5
Joined: Fri Jul 05, 2013 2:38 pm

File to Patch? (Heap-related)

Post by Xol »

I'm trying to apply a patch suggested for dealing with a certain bug:

Code: Select all

diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index a9044714..9017882 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -116,7 +116,9 @@ C_ASSERT( sizeof(ARENA_LARGE) % LARGE_ALIGNMENT == 0 );
 /* Max size of the blocks on the free lists */
 static const SIZE_T HEAP_freeListSizes[] =
 {
-    0x10, 0x20, 0x30, 0x40, 0x60, 0x80, 0x100, 0x200, 0x400, 0x1000, ~0UL
+    0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68,
+    0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xA0, 0xA8, 0xB0, 0xB8, 0xC0, 0xC8,
+    0xD0, 0xD8, 0xE0, 0xE8, 0xF0, 0xF8, 0x100, 0x200, 0x400, 0x1000, ~0UL
 };
 #define HEAP_NB_FREE_LISTS 
(sizeof(HEAP_freeListSizes)/sizeof(HEAP_freeListSizes[0]))
But in doing so it keeps giving me the following error:

Code: Select all

Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
|index a9044714..9017882 100644
|--- a/dlls/ntdll/heap.c
|+++ b/dlls/ntdll/heap.c
--------------------------
File to patch: 
I saw no mention of a specific file on the Bug page, so I'm kind of at a loss here. :?
Xol
Level 1
Level 1
Posts: 5
Joined: Fri Jul 05, 2013 2:38 pm

Re: File to Patch? (Heap-related)

Post by Xol »

Update: I tried a suggestion I found while waiting for this thread to be approved, which was to add a space in front of each line in the patch file that didn't already have one or start with a '+'. It fixed the patching problem I was having. However now I'm having a different problem. When I try to compile everything with

Code: Select all

./configure && make depend && make
like the wiki says, it ends up giving me the following error after running a ton of stuff really quickly:

Code: Select all

winebuild: base64.o is an empty file
winegcc: ../../../tools/winebuild/winebuild failed
make[1]: *** [crypt32_test-stripped.exe.so] Error 2
Any suggestions? Also, if a moderator could change the subject line for the thread to "Patching - Error 2" or something along those lines' I'd appreciate it.
User avatar
dimesio
Moderator
Moderator
Posts: 13266
Joined: Tue Mar 25, 2008 10:30 pm

Re: File to Patch? (Heap-related)

Post by dimesio »

What patch, and what bug? If the patch was written for an older version of Wine, it might simply not work with current Wine.
Xol
Level 1
Level 1
Posts: 5
Joined: Fri Jul 05, 2013 2:38 pm

Re: File to Patch? (Heap-related)

Post by Xol »

The patch is the one posted in the first code box in my first post. The bug is this one:

http://bugs.winehq.org/show_bug.cgi?id=24256
User avatar
dimesio
Moderator
Moderator
Posts: 13266
Joined: Tue Mar 25, 2008 10:30 pm

Re: File to Patch? (Heap-related)

Post by dimesio »

Based on the date it was posted to the bug report, the patch is at least 6 months old, and possibly much older (Dan says it's been "floating around"), so it may not work with current Wine. Normally I'd tell you to contact the patch author for help, but unfortunately there's no indication in the patch or the bug report who that is. Perhaps Dan knows.
Xol
Level 1
Level 1
Posts: 5
Joined: Fri Jul 05, 2013 2:38 pm

Re: File to Patch? (Heap-related)

Post by Xol »

Well, Luuk just posted the other day that it worked for him, so I would think it should still work, unless for some reason he's using an older version of WINE. In any case, the bug still exists, so if anyone else knows of a different patch I could use in its place, I'd much appreciate it. I'll see if I can get more information from Dan as well.
User avatar
dimesio
Moderator
Moderator
Posts: 13266
Joined: Tue Mar 25, 2008 10:30 pm

Re: File to Patch? (Heap-related)

Post by dimesio »

According to http://bugs.winehq.org/show_bug.cgi?id=24256#c18, Luuk didn't apply the patch, he edited the source code directly. You could try that.
Xol
Level 1
Level 1
Posts: 5
Joined: Fri Jul 05, 2013 2:38 pm

Re: File to Patch? (Heap-related)

Post by Xol »

The problem doesn't seem to be the patch itself though. Patching works fine (now that I know how to do it, heh...) It's the part where I compile WINE that gives me this error message:

Code: Select all

winebuild: base64.o is an empty file
winegcc: ../../../tools/winebuild/winebuild failed
make[1]: *** [crypt32_test-stripped.exe.so] Error 2
make[1]: Leaving directory `/home/<myname>/wine-git/dlls/crypt32/tests'
make: *** [dlls/crypt32/tests] Error 2
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Re: File to Patch? (Heap-related)

Post by DanKegel »

The patch was a little hard to use because it wasn't an
attachment. I verified it still applies, and attached
a clean version of it to that bug.

You can just remove empty .o files, that usually solves that problem.
Locked