Live data from Hacker News

A collection of debugging stories

github.com

11–17 of 17 posts

Re: A collection of debugging stories

#12
Great collection!

Maybe one could ask the authors if they could donate their debugging articles to a cc licensed repository so the articles themselves could be hosted instead of linking? That would be very nice I think.

Re: A collection of debugging stories

#14
post #10
post #7

For some reason i love reading these kind of stories, especially when you get the feel the writer is venting after a deep dive of the OS guts. A close equivalent is reading Derek Lowe's "things i won't work with" articles.

I absolutely loved the "Things I won't work with" articles, very enjoyable to read. And I even learned some things about chemistry in the process. I can only recommend everybody who is even slightly interested in chemistry to read them.

http://pipeline.corante.com/archives/things_i_wont_work_with...

Re: A collection of debugging stories

#15
Don't want to write a real post but my most memorable simple story was with a C optimizing compiler. I was using a something like struct Item { char name[12]; int flag; } with code that would would use this in a btree and use memcmp(x,y,sizeof(Item)) for ordering. The name could be non-unique but name+flag would be and give specific ordering. To fill Item I used something like (much simplified):

  x = (Item*)malloc(sizeof(Item));
  memset(x->name, 0, 12); 
  strcpy(x->name, name);
  x->flag = flag;
So the bits after name are now significant in compares but expected to be zero because of memset. Well the optimizer would effectively remove the memset in release builds due to the strcpy so the code worked most of the time in release but would occasionally break because the bytes after the null terminated name could be anything and would only come into play when name was the same for 2 items.

Re: A collection of debugging stories

#16
post #14
post #10

Earlier quoted context omitted.

I absolutely loved the "Things I won't work with" articles, very enjoyable to read. And I even learned some things about chemistry in the process. I can only recommend everybody who is even slightly interested in chemistry to read them.

http://pipeline.corante.com/archives/things_i_wont_work_with...

seems he has since moved to sciencemag, but i don't see any new articles in that category over there (and all his old corante stuff has been copied over).

http://blogs.sciencemag.org/pipeline/archives/category/thing...

Post reply on HN