AMD64 FreeBSD port works 99.9% ...

"Raymond Bero" <[email protected]> Fri, 27 Aug 2004 09:56:29 -0700
Newsgroups gmane.comp.lib.state-threads.devel
Message-ID <[email protected]>
Hello,
    I'm having a rather odd problem with the state threads library on my 
FreeBSD 5.2.1 amd64 box. I have worked past the MD_JB_SP problem with the 
following fix...

#elif defined(__amd64__)
#define MD_JB_SP   2
#else
...

added to the freebsd section of md.h. This is the same value as __i386__ and 
is the only one that seems to work for me. Everything else results in a bus 
error inside of st some where on start up.

This is the only change I have made to st to get my app to work 99.9% of the 
time. What doesn't work is *printf() calls with a double arguement. (I'm 
using doubles to determine high precision timing values). There utlimately 
ends up being a bus error in libc in any of the printf() calls. I've tracked 
the problem down to a problem with va_start(). The va_*() calls manipulate 
the stack and that seems to get out of whack when trying to print doubles. 
Crazy. :) All other *printf() calls work fine as long as I don't try to do 
anything with doubles.

I'd like to know if anyone else is seeing this kind of problem or if anyone 
has an idea of how to fix this. I'm surprised I was able to get ST to work 
at all with such a small fix to md.h. Maybe I'm missing something else 
important? Is someone working on an official port for FreeBS on amd64?

cheers,
Ray

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click