lkml.org 
[lkml]   [1997]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: modutils snapshot 960116

Richard you assume a lot about how alloca() works on the low level in
genksyms.c

b = e = alloca(sizeof(*e));
*(e++) = list;
while ((list = list->next) != NULL)
*(b = alloca(sizeof(*b))) = list;

while (b != e)
{
struct string_list *cur;
struct symbol *subsym;

cur = *(b++);
switch (cur->tag)

You simply cannot expect alloca() to give you consequetive pieces of
memory on the stack. And in fact because on the Sparc you never get
consequetive pieces of memory, genksyms dies instantly there.

You also assume the stack grows down, and thats another no-no. ;-)

---------------------------------------------////
Yow! 11.26 MB/s remote host TCP bandwidth & ////
199 usec remote TCP latency over 100Mb/s ////
ethernet. Beat that! ////
-----------------------------------------////__________ o
David S. Miller, davem@caip.rutgers.edu /_____________/ / // /_/ ><

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.064 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site