Re: [patch] LNK4078 and LNK4210 linking with x64 static libs
On 19-10-2010 19:23, Jeffrey Walton wrote: So I wasted my precious time preparing a patch while someone else had already posted a patch off-list. Lol... If you're going to throw a tantrum every time someone beats you ta a patch, you owe us a tantrum: WinCE patch: http://www.mail-archive.com/openssl-users@openssl.org/msg61765.html Pierre Delaage submission: http://www.mail-archive.com/openssl-...@openssl.org/msg28264.html :) I don't mind someone patching it before me, that is fine. I mind that someone moved a discussion off-list without cross-posting to the original list or at least posting a FUT-like message to the original thread, specifying where exactly the discussion has been moved. This is general good practice, also to help those who might (much later) find the thread in Google and get only half the story. (The post suggesting that someone file a bug is not an exact FUT, a link to the bug number as soon as work began would have been). On Tue, Oct 19, 2010 at 7:20 AM, Jakob Bohmjb-open...@wisemo.com wrote: On 19-10-2010 12:32, per frykenvall wrote: Thanks, Jakob! However, I followed Dr. Stephen Hensons advice earlier in this thread and filed a report to the bug tracker, and got a resolution from Andy Polyakov a week ago, based on your suggestion. I've tested it and am fully satisfied: [openssl.org #2356] Resolved: LNK4078 and LNK4210 linking with x64 static libs http://cvs.openssl.org/chngview?cn=19935 So I wasted my precious time preparing a patch while someone else had already posted a patch off-list. Thanks to everyone involved for not telling the list that this issue had been resolved in another forum! Of course, that resolution does not include the race condition you describe. Best regards, Per On 2010-10-18 17:35, Jakob Bohm wrote: I have now created an actual patch to fix this. It turns out to be a small pattern bug in x86_64xlate.pl Patch attached as openssl-1.0.0a-x86_64attr.patch. While debugging this patch I ran into an unrelated issue where nmake would invoke nasm before the .asm file had been completely output. This is probably a bug in the perl build used on one of the test machines, but I think the patch to kludge around that race condition might be useful too. Patch attached as openssl-1.0.0a-x86_64cpuid-build-race.patch. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: [patch] LNK4078 and LNK4210 linking with x64 static libs
Thanks, Jakob! However, I followed Dr. Stephen Hensons advice earlier in this thread and filed a report to the bug tracker, and got a resolution from Andy Polyakov a week ago, based on your suggestion. I've tested it and am fully satisfied: [openssl.org #2356] Resolved: LNK4078 and LNK4210 linking with x64 static libs http://cvs.openssl.org/chngview?cn=19935 Of course, that resolution does not include the race condition you describe. Best regards, Per On 2010-10-18 17:35, Jakob Bohm wrote: I have now created an actual patch to fix this. It turns out to be a small pattern bug in x86_64xlate.pl Patch attached as openssl-1.0.0a-x86_64attr.patch. While debugging this patch I ran into an unrelated issue where nmake would invoke nasm before the .asm file had been completely output. This is probably a bug in the perl build used on one of the test machines, but I think the patch to kludge around that race condition might be useful too. Patch attached as openssl-1.0.0a-x86_64cpuid-build-race.patch. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: [patch] LNK4078 and LNK4210 linking with x64 static libs
On 19-10-2010 12:32, per frykenvall wrote: Thanks, Jakob! However, I followed Dr. Stephen Hensons advice earlier in this thread and filed a report to the bug tracker, and got a resolution from Andy Polyakov a week ago, based on your suggestion. I've tested it and am fully satisfied: [openssl.org #2356] Resolved: LNK4078 and LNK4210 linking with x64 static libs http://cvs.openssl.org/chngview?cn=19935 So I wasted my precious time preparing a patch while someone else had already posted a patch off-list. Thanks to everyone involved for not telling the list that this issue had been resolved in another forum! Of course, that resolution does not include the race condition you describe. Best regards, Per On 2010-10-18 17:35, Jakob Bohm wrote: I have now created an actual patch to fix this. It turns out to be a small pattern bug in x86_64xlate.pl Patch attached as openssl-1.0.0a-x86_64attr.patch. While debugging this patch I ran into an unrelated issue where nmake would invoke nasm before the .asm file had been completely output. This is probably a bug in the perl build used on one of the test machines, but I think the patch to kludge around that race condition might be useful too. Patch attached as openssl-1.0.0a-x86_64cpuid-build-race.patch. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: [patch] LNK4078 and LNK4210 linking with x64 static libs
Hi, I was not involved in this discussion, but I wanted just to say that patches and other development issues are discussed in the openssl-dev list and all messages sent to r...@openssl.org are also copied to that list not the users list. Anyone interested in OpenSSL internals should join openssl-dev to be kept updated. That being said, I understand your frustration but the others certainly thought you were aware of their discussion in the other list. Cheers, -- Mounir IDRASSI IDRIX http://www.idrix.fr On 10/19/2010 1:20 PM, Jakob Bohm wrote: On 19-10-2010 12:32, per frykenvall wrote: Thanks, Jakob! However, I followed Dr. Stephen Hensons advice earlier in this thread and filed a report to the bug tracker, and got a resolution from Andy Polyakov a week ago, based on your suggestion. I've tested it and am fully satisfied: [openssl.org #2356] Resolved: LNK4078 and LNK4210 linking with x64 static libs http://cvs.openssl.org/chngview?cn=19935 So I wasted my precious time preparing a patch while someone else had already posted a patch off-list. Thanks to everyone involved for not telling the list that this issue had been resolved in another forum! Of course, that resolution does not include the race condition you describe. Best regards, Per On 2010-10-18 17:35, Jakob Bohm wrote: I have now created an actual patch to fix this. It turns out to be a small pattern bug in x86_64xlate.pl Patch attached as openssl-1.0.0a-x86_64attr.patch. While debugging this patch I ran into an unrelated issue where nmake would invoke nasm before the .asm file had been completely output. This is probably a bug in the perl build used on one of the test machines, but I think the patch to kludge around that race condition might be useful too. Patch attached as openssl-1.0.0a-x86_64cpuid-build-race.patch. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: [patch] LNK4078 and LNK4210 linking with x64 static libs
So I wasted my precious time preparing a patch while someone else had already posted a patch off-list. Lol... If you're going to throw a tantrum every time someone beats you ta a patch, you owe us a tantrum: WinCE patch: http://www.mail-archive.com/openssl-users@openssl.org/msg61765.html Pierre Delaage submission: http://www.mail-archive.com/openssl-...@openssl.org/msg28264.html :) On Tue, Oct 19, 2010 at 7:20 AM, Jakob Bohm jb-open...@wisemo.com wrote: On 19-10-2010 12:32, per frykenvall wrote: Thanks, Jakob! However, I followed Dr. Stephen Hensons advice earlier in this thread and filed a report to the bug tracker, and got a resolution from Andy Polyakov a week ago, based on your suggestion. I've tested it and am fully satisfied: [openssl.org #2356] Resolved: LNK4078 and LNK4210 linking with x64 static libs http://cvs.openssl.org/chngview?cn=19935 So I wasted my precious time preparing a patch while someone else had already posted a patch off-list. Thanks to everyone involved for not telling the list that this issue had been resolved in another forum! Of course, that resolution does not include the race condition you describe. Best regards, Per On 2010-10-18 17:35, Jakob Bohm wrote: I have now created an actual patch to fix this. It turns out to be a small pattern bug in x86_64xlate.pl Patch attached as openssl-1.0.0a-x86_64attr.patch. While debugging this patch I ran into an unrelated issue where nmake would invoke nasm before the .asm file had been completely output. This is probably a bug in the perl build used on one of the test machines, but I think the patch to kludge around that race condition might be useful too. Patch attached as openssl-1.0.0a-x86_64cpuid-build-race.patch. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: [patch] LNK4078 and LNK4210 linking with x64 static libs
I have now created an actual patch to fix this. It turns out to be a small pattern bug in x86_64xlate.pl Patch attached as openssl-1.0.0a-x86_64attr.patch. While debugging this patch I ran into an unrelated issue where nmake would invoke nasm before the .asm file had been completely output. This is probably a bug in the perl build used on one of the test machines, but I think the patch to kludge around that race condition might be useful too. Patch attached as openssl-1.0.0a-x86_64cpuid-build-race.patch. Comment: This patch fixes incorrect attributes of the .init segment in translated assemply for x86_64 when linked with Visual C code. This fix is applicable even if it is also decided to not use an .init seg anymore in x86_64cpuid.pl. Author: WiseMo A/S, licensed under the Openssl license diff -Naur openssl-1.0.0a.orig/crypto/perlasm/x86_64-xlate.pl openssl-1.0.0a/crypto/perlasm/x86_64-xlate.pl --- openssl-1.0.0a.orig/crypto/perlasm/x86_64-xlate.pl 2010-06-01 05:57:26.0 + +++ openssl-1.0.0a/crypto/perlasm/x86_64-xlate.pl 2010-10-13 17:53:21.0 + @@ -542,16 +542,16 @@ $line = .CRT\$XCU if ($line eq .init); if ($nasm) { $v=section $line; - if ($line=~/\.([px])data/) { + if ($line=~/\.(pdata|xdata|CRT\$)/) { $v.= rdata align=; - $v.=$1 eq p? 4 : 8; + $v.=$1 eq pdata? 4 : 8; } } else { $v=$current_segment\tENDS\n if ($current_segment); $v.=$line\tSEGMENT; - if ($line=~/\.([px])data/) { + if ($line=~/\.(pdata|xdata|CRT\$)/) { $v.= READONLY; - $v.= ALIGN(.($1 eq p ? 4 : 8).) if ($masm=$masmref); + $v.= ALIGN(.($1 eq pdata ? 4 : 8).) if ($masm=$masmref); } } $current_segment = $line; Comment: Some perl interpreters will not always wait for the child pipe filter to exit before the parent perl interpreter exits (on platforms where doing so does not kill the filter process). This in turn causes a race condition between the x86_64-xlate.pl script and make invoking the assembler on the output file. This patch tries harder to avoid that race condition by increasing the flush mode of perl just before closing the pipe AND adding a grace sleep after closing the pipe. Author: WiseMo A/S, licensed under the Openssl license diff -Naur openssl-1.0.0a.orig/crypto/x86_64cpuid.pl openssl-1.0.0a/crypto/x86_64cpuid.pl --- openssl-1.0.0a.orig/crypto/x86_64cpuid.pl 2010-04-14 19:25:09.0 + +++ openssl-1.0.0a/crypto/x86_64cpuid.pl2010-10-13 17:31:32.0 + @@ -229,4 +229,6 @@ .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu ___ +$|=1; # flush more thoroughly close STDOUT; # flush +sleep(2); # Break race against background pipe completion