View Single Post
  #6   (View Single Post)  
Old 5th May 2013
thirdm thirdm is offline
Spam Deminer
 
Join Date: May 2009
Posts: 248
Default

So this was a bug in cwm (which means this thread ideally ought not to have been reclassified as a port issue -- I guess as BSD fans we suppose emacs more likely to be at fault than a window manager in OpenBSD's base?). The likely reason for it going away when I first tried adding debug info was that it involved an uninitialized variable. What value the variable has can depend on things like architecture and binary layout. I'd say this also would explain why it was architecture dependent for you, daemonfowl.

As an aside, I wasn't going about adding debug info the right way. There is a make variable documented in share/mk/bsd.README named DEBUG which will set the CFLAGS and STRIP variables appropriately. I haven't gone back to see exactly what I did wrong with CFLAGS yet, but once I used...
Code:
make DEBUG=-g
...in the cwm source directory I got a cwm binary that I could step through and that still showed the buggy behaviour. Maybe I treated CFLAGS as an environment variable as opposed to a make variable? I'm mixed up right now about whether environment variables become make variables. I'll play around with that and read a bit more when I'm on that machine again.

Someone who may or may not be the owner of the forum handle thirdm posted a report and a patch here: http://marc.info/?l=openbsd-bugs&m=136751371922327&w=2

If anyone wants more explanation, let me know.
Reply With Quote