From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,f71df6341fe1647a X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-08-23 08:50:32 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!not-for-mail Message-ID: <3B852645.D92BD669@zk3.dec.com> From: Joe Mario X-Mailer: Mozilla 4.77 [en] (X11; U; OSF1 V5.1 alpha) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: BUG of Tru64UNIX V5.1 References: <2f6bec0a.0108221827.62166dda@posting.google.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Date: Thu, 23 Aug 2001 11:50:29 -0400 NNTP-Posting-Host: 16.141.0.18 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 998581830 16.141.0.18 (Thu, 23 Aug 2001 08:50:30 PDT) NNTP-Posting-Date: Thu, 23 Aug 2001 08:50:30 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:4337 > Isn't it a OS bug that"((int)(&((struct stack_layout > ...)(0))->pcb)&127)?-1:1" can't be positive interger? Ginny: This is a poor-man's way to ensure that the pcb member of the stack_layout structure is properly aligned. In your compilation, the pcb member was not aligned properly so the the size of the _pcb_align_check array was -1, which intentionally results in a compile-time error. (Note that since this was added, the compiler has added pragmas to support this kind of compile-time checking.) It looks like you are either building your module wrong or you've modified something that caused the size/layout of the stack_layout struct to change. Joe "Ginny E. Kim" wrote: > > I got following message while comiling my module with defined > "_KERNEL". > > cc: Error: /sys/include/machine/pcb.h, line 179: In the declaration of > "x", the array bound "((int)(&((struct stack_layout > ...)(0))->pcb)&127)?-1:1" is not a positive integer. (notposint) > struct _pcb_align_check { char x[((int)stack_to_pcb(0) & 127) ? -1 : > 1]; }; > -------------------------------^ > > The header file , /sys/include/machine/pcb.h has following contents.. > > #define stack_to_pcb(stack) (&((struct stack_layout *)(stack))->pcb) > #define pcb_to_stack(pcb) > ((vm_offset_t)(((long)(pcb))&~(KERNEL_STACK_SIZE-1))) > struct _pcb_size_check { char x[(sizeof(struct pcb) == 0x300) ? 1 : > -1]; }; > struct _pcb_align_check { char x[((int)stack_to_pcb(0) & 127) ? -1 : > 1]; }; > > Isn't it a OS bug that"((int)(&((struct stack_layout > ...)(0))->pcb)&127)?-1:1" can't be positive interger?