From f2da7e0e490af25ba58a89c29e33f0686e451922 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Thu, 21 Apr 2005 12:47:08 +0000 Subject: [PATCH] Do not try to store 64 bits into 32 bit errno variable. With the changed libc data layout, this was corrupting _PathLocale variable leading to programs dumping core in non-default locales. --- lib/libc/amd64/sys/cerror.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/amd64/sys/cerror.S b/lib/libc/amd64/sys/cerror.S index f9f4da0f46a0..fa28eca15b1b 100644 --- a/lib/libc/amd64/sys/cerror.S +++ b/lib/libc/amd64/sys/cerror.S @@ -55,7 +55,7 @@ HIDENAME(cerror): pushq %rax call PIC_PLT(CNAME(__error)) popq %rcx - movq %rcx,(%rax) + movl %ecx,(%rax) movq $-1,%rax movq $-1,%rdx ret