Chasing "undefined method for Fixnum"
Eric Hodel | Fri, 07 Apr 2006 17:28:35 GMT
I’ve been running the unit tests for 43 People on my Powerbook since the shared development box slowed to a crawl after importing the entire production database and I’m now seeing the “undefined method [blah] for -517611318:Fixnum” message occasionally on my Powerbook. Not content to suffer through running another thirty seconds of tests I reached into eval.c and added a call to rb_bug() when method_missing is called on the Fixnum -517611318.
Within a couple runs of the tests I ended up with a core, but the NODE * argument to rb_eval() was 0×0 for all calls. This made no sense, that value can’t possibly be 0×0 for every call to rb_eval, the optimization flags must have been getting in the way.
So I rebuilt Ruby with -O0 and haven’t gotten a core since. So one of the optimizations that -O or -O2 makes is screwing up Ruby’s internals. Now I’m trying a -O1 build to see if I can reproduce. If I don’t get any problems with -O1 I’ll try sorting through -O2’s flags until I find the culprit.
11 commentsComments 
Comments are disabled

Articles