[Bug 51361] SimSig with Wine 6.18 breaks after upgrading from libxml2 2.9.10 to 2.9.12

WineHQ Bugzilla wine-bugs at winehq.org
Sat Oct 2 13:06:30 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51361

Chris Head <bugs at chead.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|6.11                        |6.18

--- Comment #15 from Chris Head <bugs at chead.ca> ---
(In reply to Damjan Jovanovic from comment #14)
> (In reply to Chris Head from comment #13)
> > > Can you git bisect libxml2?
> > 
> > Maybe. I’m using a system install of Wine and libxml2. To use a custom build
> > of libxml2, can I just point LD_LIBRARY_PATH at it when launching Wine, or
> > (since Wine is a rather complicated beast) will that not do the job?
> 
> export LD_PRELOAD=/path/to/your/new/libxml.so.x.y.z 
> 
> could also work, though it's not the prettiest.

LD_PRELOAD didn’t work because, whether I pointed it at a 32-bit or 64-bit SO
file, Wine seemed to want the other one (I guess some parts need each ABI).
LD_LIBRARY_PATH pointing to a set of directories which, between them, contain
both, did seem to do the job though. I just wasn’t sure whether Wine would
respect that variable, since it’s kind of a mix of ELF and PE files and has
some of its own library loading logic, but it seems to work.

The first failing commit in libxml2 is
d25460da14cd31ab807c77580da5a8efcacae97b. I tried adding the individual changes
in that commit one by one, and discovered that, starting from the previous
commit, e20c9c148c725e2933efa143ee6a543a5cae4204, just doing this little patch
(which is two lines out of d254) introduces the problem:

--- a/xpath.c
+++ b/xpath.c
@@ -507,7 +507,8 @@ double xmlXPathNINF;
  */
 void
 xmlXPathInit(void) {
-    xmlXPathNAN = NAN;
+    double zero = 0.0;
+    xmlXPathNAN = 0.0 / zero;
     xmlXPathPINF = INFINITY;
     xmlXPathNINF = -INFINITY;
 }

Is it possible that Wine is calling xmlXPathInit with the FPU in an unusual
configuration? Notable to my eyes is that this function *used* to do only
assignments of compile-time constants to variables, but with this change, it is
doing actual math at runtime (I verified this by looking at the disassembly:
without the change, xmlXPathInit just does some mov, fldl, and fstpl; with the
change, it does an fldz+fdivl in there as well).

> 
> > > Or provide a download link to this launcher?
> > 
> > This I can do: https://www.simsig.co.uk/File/DownloadSimSig
> 
> Thank you. It seems to install and run fine here. FreeBSD 13, latest Wine
> git, libxml2 2.9.12. The only problem I see is that when I click on "Train
> list" during the simulation, I get a "Can't find <body> element" messagebox,
> but it still continues running after that. Am I testing it wrong?

Just installing and running doesn’t seem to trigger the problem for me either.
The fastest and most visible way to trigger it seems to be to put a username
and password in the boxes on the front page of the launcher (you can create an
account for free on the website); what should happen is you get a green “Logged
in OK” message under the username box and a white-on-green checkmark beside the
password box after tabbing out of the box, but when this bug shows up, for me,
I get neither of the above, and a dialog box saying “Microsoft MSXML is not
installed” (accompanied by some of the aforementioned log messages in the
terminal).

If you’d rather not create an account, after running the auto-updater, the
newest version seems to generate the error spam on the terminal right at
startup; even then, without a username/password entered, it seems to be
possible to ignore the errors and proceed anyway.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list