This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11333] size of struct dirent does not agree with kernel when using LFS on 32bit


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]