[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call



On Thu, Sep 09, 1999 at 04:56:13AM -0500, Chris Lawrence wrote:

> dpkg under my self-compiled Linux 2.3.17 seg faults on startup if a
> non-dpkg-deb option is given.  The problem is avoided if the call to
> sysinfo() in main/filesdb.c is bypassed.  I can't see what's going
> wrong (it's probably something in kernel space clobbering user space,
> but the code seems fine and probably hasn't changed in a while).

Me Too (tm).

I had read the 2.3.17 patch beforehand and some neurons in my brain
connected and made me think of this part of the 2.3.17 patch being the
culprit:

diff -urN linux-pre1/include/linux/kernel.h linux/include/linux/kernel.h
--- linux-pre1/include/linux/kernel.h	Tue Aug 31 14:17:19 1999
+++ linux/include/linux/kernel.h	Tue Sep  7 18:08:32 1999
@@ -91,11 +91,12 @@
 	unsigned long freeram;		/* Available memory size */
 	unsigned long sharedram;	/* Amount of shared memory */
 	unsigned long bufferram;	/* Memory used by buffers */
-	unsigned long totalbig;		/* Total big memory size */
-	unsigned long freebig;		/* Available big memory size */
 	unsigned long totalswap;	/* Total swap space size */
 	unsigned long freeswap;		/* swap space still available */
 	unsigned short procs;		/* Number of current processes */
+	unsigned long totalbig;		/* Total big memory size */
+	unsigned long freebig;		/* Available big memory size */
+	char _f[22-2*sizeof(long)];	/* Padding: libc5 uses this.. */
 };
 
 #endif

...Not sure what the original point of this patch is, but reversing it
makes things work agian.

Simon-

| Simon Kirby               |   Systems Administration |
| mailto:sim@netnation.com  | NetNation Communications |
| http://www.netnation.com/ |     Tech: (604) 684-6892 |


Reply to: