Chiltie's Musings

I Like Sunsets

Stacks Suck

Posted on September 28, 2005 at 03:12 AM

I was having a segmentation fault problem in my DHON code. Its from a stack collision. Xcode loads ~52000 stack frames when the debugger catches on the crash. I finally found a way around this by compiling with
-Wl,-stack_size -WL,2000000. This had the nice effect of making my stack large enough to handle it, but it may not handle all stack collisions. I can’t avoid using the stack though, since the only way I’ve come up with for the type of search I need to do is massively recursive.

Comments: (disabled) Tags: dhon, programming

Stupid Linker

Posted on September 25, 2005 at 05:24 PM

I wasted most of last night and today trying to hunt down an EXC_BAD_ACCESS exception in my DHON code. It was in a new program I was linking against my library, but which wasn’t doing anything new yet that my unit tests didn’t explicitly do. So it really puzzled me as to why it didn’t work. Know what it was? I was linking dependencies in a different order and something got messed up in the process. Ain’t that a crock o’ $#!% ?

Comments: (disabled) Tags: programming