This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11333] size of struct dirent does not agree with kernel when using LFS on 32bit
- From: "kees at outflux dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 27 Feb 2010 06:16:17 -0000
- Subject: [Bug libc/11333] size of struct dirent does not agree with kernel when using LFS on 32bit
- References: <20100227055549.11333.kees@outflux.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From kees at outflux dot net 2010-02-27 06:16 -------
Created an attachment (id=4636)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4636&action=view)
Makefile
Line-wrapping did nasty things to the 255-character filename in the original
bug description. Here is a Makefile and test.c that demonstrates the issue.
What's really odd is that the 4 byte difference appears to be strictly padding?
All the offsets and sizes are the same between 64bit and 32bit:
./test-native bug-dir
sizeof(struct dirent): 280
sizeof(dirent.d_ino@0): 8
sizeof(dirent.d_off@8): 8
sizeof(dirent.d_reclen@16): 2
sizeof(dirent.d_type@18): 1
sizeof(dirent.d_name@19): 256
./test-m32 bug-dir
sizeof(struct dirent): 276
sizeof(dirent.d_ino@0): 8
sizeof(dirent.d_off@8): 8
sizeof(dirent.d_reclen@16): 2
sizeof(dirent.d_type@18): 1
sizeof(dirent.d_name@19): 256
*** stack smashing detected ***: ./test-m32 terminated
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11333
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.