Where is the best place to report a fscanf bug found under wine-1.3.27?
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Mon Aug 29 20:43:41 CDT 2011
Today I discovered while debugging a fairly complex application that I
built under MinGW/MSYS/wine that the scanf family of functions was
introducing float (32-bit floating-point) noise into double (64-bit
I implemented a simple test code to make it extremely easy to
replicate this issue:
while(fscanf(stdin, " %le ", &x) == 1)
On Linux you can build it and run it with these expected results with
some numerical noise in the last place:
1.1e-04" | ./a.out
But if you do the same build on wine you get these noisy results for
all the values with negative exponents (but positive exponents are
fine for some reason).
1.1e-04" | ./a.exe
The level of noise is consistent with some float (as opposed to
double) logic incorrectly being used in the fscanf library function
for negative exponents, and I had similar bad numerical noise results
from sscanf with my complex application.
My hardware is 64-bit. My wine is 32-bit wine-1.3.27
built on a Debian Squeeze box
with the standard 32-bit Debian build dependencies for wine. The wine
gcc is from the MinGW version you get with the automatic
MinGW/MSYS installer from a few days ago. It's version
bash.exe-3.1$ gcc --version
gcc.exe (GCC) 4.5.2
The above wine test was run in a wineconsole running
the MSYS version of bash.
So for my wine installation (which has no access to Microsoft
libraries), how can I find out which library is providing the fscanf
functionality that is introducing float noise into double results
for the above test programme? I need that information so that
I can properly report the above bug.
If someone here knows exactly where to make the fix and is inspired to
do so, I would be happy to test the result with my more complex
ephcom2 application (reading and interpolating JPL ephemerides, see
http://sourceforge.net/news/?group_id=567377&id=302987 for the latest
release announcement). That release was POSIX only, but I hope to
make the next version work properly on Windows as well. The current
status is that ephcom2 builds and mostly tests well under wine except
for the above numerical noise in sscanf results which I would like to
get rid of to see if there are any other remaining generic Windows
issues in the software.
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
More information about the wine-devel