From: Steve Jacobson
Subject: newly revised hw1b nightmare grammar
To: zelenski@CS.Stanford.EDU, sjac3@leland.Stanford.EDU, sjacobso@cisco.com
Date: Mon, 27 Apr 1998 13:05:09 -0700 (PDT)
X-Mailer: ELM [version 2.4 PL25]
The hw1b nightmare grammar (newly revised).
This was inspired by a fitful night of half-sleep before hw1b
was due. I spent a very long evening writing the darray.c code,
and then had a segmentation fault I was too tired to track down.
I ended up debugging code all night in my sleep, dreaming about
the most bizarre and inconsequential things that could be wrong
(none of which were, of course).
SteveJ
{
because it went
So I ran it under gdb, but So I tried Purify, which told me
I've got to remember to ;
}
{
My code ;
My code ;
The example search code ;
The they gave us ;
The provided ;
My code ;
My code ;
}
{
;
;
}
{
DArray ;
HashTable ;
old scanner ;
darray.c ;
search.c ;
hashtable.c ;
old scanner.c ;
}
{
darray.h ;
search.h ;
hashtable.h ;
old scanner.h ;
}
{
scanner.o ;
darray.o ;
hashtable.o ;
old scanner.c ;
}
{
got a segfault ;
had a bus error ;
had an alignment error ;
just hung ;
went off in the weeds somewhere ;
went out to lunch ;
crashed in a spectacular ball of fire ;
ate the big one and died ;
went into a death spiral ;
collapsed in a pile of smoldering wreckage ;
asserted again ;
spewed these really bizarre messages ;
}
{
;
}
{
;
;
;
;
;
and finally dereferenced a NULL *. ;
and ended up calling a NULL function. ;
}
{
to a ;
through a ;
dereferencing a ;
}
{
;
;
which was really a ;
which should have been a ;
}
{
char ** ;
HashTable * ;
DArray * ;
void * ;
darray [] ;
hasharray [] ;
}
{
I can't remember and ;
I wish I knew and ;
why won't it and ;
I forget where I put that darn gdb handout. ;
I wonder where I put my gdb book. ;
}
{
the command to ;
the syntax to ;
how to ;
the right way to ;
the best way to ;
any way to ;
}
{
clear the breakpoints ;
dump the local variables ;
dump the parameters ;
step out of the function ;
show the stack trace ;
stop before the crash ;
}
{
I had and ;
there's and ;
for some reason I got and ;
I have to deal with and ;
I leaked _all_ my memory. ;
I leaked 100 percent of my memory. ;
}
{
a UMR error ;
an ABR error ;
an ABW error ;
an NPR radio error ;
an NPW error ;
a BSR error ;
a BSW error ;
a FEE FIE FOE FUM error ;
a FMR error ;
a FMW error ;
a FNH error ;
}
{
add some more comments to and ;
try and get some sleep, and ;
try and use only one late day, and ;
walk through the code and ;
use a Scanner for stdin, and ;
clean up a bit and ;
put those grotesque casts in a helper function, and ;
pull that ugly hack out of and ;
read the header files just one more time. ;
}