Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 2013 23:48:59 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257233 - head/lib/csu/arm
Message-ID:  <201310272348.r9RNmxU5086868@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cognet
Date: Sun Oct 27 23:48:59 2013
New Revision: 257233
URL: http://svnweb.freebsd.org/changeset/base/257233

Log:
  Use the size of the MACHINE_ARCH string instead of sizeof(uint32_t). It can
  happen sizeof(MACHINE_ARCH) is more than 4 bytes, and bad things would
  happen. This should make the ctors being called again on armeb.

Modified:
  head/lib/csu/arm/crt1.c

Modified: head/lib/csu/arm/crt1.c
==============================================================================
--- head/lib/csu/arm/crt1.c	Sun Oct 27 22:18:27 2013	(r257232)
+++ head/lib/csu/arm/crt1.c	Sun Oct 27 23:48:59 2013	(r257233)
@@ -123,7 +123,7 @@ static const struct {
 	char	desc[sizeof(MACHINE_ARCH)];
 } archtag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = {
 	.namesz = sizeof(NOTE_FREEBSD_VENDOR),
-	.descsz = sizeof(int32_t),
+	.descsz = sizeof(MACHINE_ARCH),
 	.type = ARCH_NOTETYPE,
 	.name = NOTE_FREEBSD_VENDOR,
 	.desc = MACHINE_ARCH



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310272348.r9RNmxU5086868>