[Ltrace-devel] Fwd: [PATCH 4/4 ] layout_struct must not call align if alignment set by type_alignof equals 0

Thierry Fauck@linux.vnet.ibm.com thierry at linux.vnet.ibm.com
Wed Mar 23 17:23:28 UTC 2016




-------- Forwarded Message --------
Subject: 	[PATCH] layout_struct must not call align if alignment set by
type_alignof equals 0
Date: 	Wed, 23 Mar 2016 15:40:50 +0100
From: 	Thierry Fauck <thierry.fauck at fr.ibm.com>
To: 	ltrace-devel at lists.alioth.debian.org
CC: 	Thierry Fauck <tfauck at free.fr>



From: Thierry Fauck <tfauck at free.fr>

	modified:   type.c
Signed-off-by: Thierry Fauck <tfauck at free.fr>
---
 type.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/type.c b/type.c
index 0db94f3..db042db 100644
--- a/type.c
+++ b/type.c
@@ -152,6 +152,8 @@ layout_struct(struct process *proc, struct arg_type_info *info,
 		size_t alignment = type_alignof(proc, field->info);
 		if (alignment == (size_t)-1)
 			return -1;
+		else if (alignment == (size_t)0)
+			return 0;
 
 		/* Add padding to SZ to align the next element.  */
 		sz = align(sz, alignment);
-- 
2.7.0



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20160323/c6e29646/attachment.html>


More information about the Ltrace-devel mailing list