From owner-svn-src-all@FreeBSD.ORG Tue Feb 16 02:22:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A59D91065694; Tue, 16 Feb 2010 02:22:59 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95FDB8FC14; Tue, 16 Feb 2010 02:22:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G2MxSg084982; Tue, 16 Feb 2010 02:22:59 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G2MxVh084980; Tue, 16 Feb 2010 02:22:59 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201002160222.o1G2MxVh084980@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 16 Feb 2010 02:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203946 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 02:22:59 -0000 Author: marcel Date: Tue Feb 16 02:22:59 2010 New Revision: 203946 URL: http://svn.freebsd.org/changeset/base/203946 Log: The static TLS size as given by tls_static_space includes TLS_TCB_SIZE bytes of TCB in variant I. Modified: head/lib/libc/gen/tls.c Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Tue Feb 16 01:44:14 2010 (r203945) +++ head/lib/libc/gen/tls.c Tue Feb 16 02:22:59 2010 (r203946) @@ -137,11 +137,11 @@ __libc_allocate_tls(void *oldtcb, size_t if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); - tcb = calloc(1, tls_static_space + tcbsize); + tcb = calloc(1, tls_static_space + tcbsize - TLS_TCB_SIZE); tls = (Elf_Addr **)(tcb + tcbsize - TLS_TCB_SIZE); if (oldtcb != NULL) { - memcpy(tls, oldtcb, tls_static_space + TLS_TCB_SIZE); + memcpy(tls, oldtcb, tls_static_space); free(oldtcb); /* Adjust the DTV. */