This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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]

Fix for broken pthread_cancel on MIPS N32, glibc-ports 2.5.


The use of __WORDSIZE in computing the padding for struct siginfo is
incorrect, because it is derived from the pointer size, which is 32
under N32. So the 64 bit kernel and N32 glibc will disagree about the
structure layout, causing problems in signal handling.

Index: glibc/glibc-2.5/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
===================================================================
---
glibc.orig/glibc-2.5/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
2005-03-28 01:17:43.000000000 -0800
+++ glibc/glibc-2.5/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
2007-05-25 18:11:54.492594104 -0700
@@ -43,7 +43,7 @@
 # define __have_siginfo_t	1
 
 # define __SI_MAX_SIZE		128
-# if __WORDSIZE == 64
+# if (_MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32)
 #  define __SI_PAD_SIZE		((__SI_MAX_SIZE / sizeof (int))
- 4)
 # else
 #  define __SI_PAD_SIZE		((__SI_MAX_SIZE / sizeof (int))
- 3)


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