May. 1st, 2005

talarubi: (what is hope?)
Brownie points to anyone who can spot the dire problem:
typedef AsmParserRec* AsmParser;

int NewAsmParser(AsmParser* Parser, char* Input, int Length) {
  // Note: New() is like Pascal New, e.g. it modifies the supplied pointer.
  //   Hence pass-by-reference.
  if(New(Parser, sizeof(AsmParser))) {
    (*Parser)->Input     = Input;
    (*Parser)->Length    = Length;
    (*Parser)->Line      = 1;
    (*Parser)->Column    = 1;
  ...
}
Hey, I know. Almost nobody ever comments in here, so reply with the right guess, and I'll get you an LJ icon or something? 8)

This otherwise innocous snippet took up my morning bluescreening Win9x!! If I didn't have access to a box with a real OS I don't know what I'd be doing right now... But fortunately, GDB under WinXP correctly traps the problem even though it runs "fine" from the prompt. Code is happy now.

Is it surprising that the dumbest goofs are the most devastating? Eesh. x..X

Profile

talarubi: (Default)
Talarubi

January 2007

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031   

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 9th, 2025 07:45 am
Powered by Dreamwidth Studios