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

Jesse Pollard (pollard@tomcat.admin.navo.hpc.mil)
Fri, 10 Sep 1999 13:28:57 -0500 (CDT)


>The best I have so far is
>
> struct _foo
> {
> ...
> ...
> }
>
> struct real_foo
> {
> ...
> ...
> char pad [64-sizeof(struct _foo)] __attribute((packed));
> }

An alternative:

struct real_foo
{
struct _foo {
...
...
} b;
char pad [64-sizeof(struct _foo)];
}

Although this does alter references to <var>.b.<ref>, It does eliminate
the duplicate entry for the contents of _foo. and real_foo.

BTW, the structure (in all forms) assumes that 64 is >= sizeof(struct ...
code. This may not always be the case. How about making it:

char pat [64 - (sizeof(struct _foo) % 64)]

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/