qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1913913] [NEW] i386-linux-user returns -1 in sigcontext->trapno


From: Dirk A Niggemann
Subject: [Bug 1913913] [NEW] i386-linux-user returns -1 in sigcontext->trapno
Date: Sun, 31 Jan 2021 00:11:08 -0000

Public bug reported:

QEMU development version, git commit
74208cd252c5da9d867270a178799abd802b9338. Behaviour has been noted in
5.2.0 generally.

Certain 16-bit windows programs crash WINE under QEMU linux-user with:

0084:err:seh:segv_handler Got unexpected trap -1
wine: Unhandled illegal instruction at address 00006D65 (thread 0084), starting 
debugger...

They run correctly on native i386.

Upon further inspection,it becomes clear these programs are failing at
addresses where they are making DOS calls (int 21h ie CD 21 for
instance).

It is also clear that WINE is expecting an exception/signal at this
point, to patch in the actual int21h handling code inside WINE.

However, wine uses sigcontext output extensively to do its structured
exception handling. sigcontext->trapno being set to -1 seems to confuse
it, causing it to treat the exception as an actual unhandled error.

I do not know if exception_index is being left at -1 due to the case of
privileged instructions being executed in 16-bit ldts not being handled
specifically, or if there is some other illegal instruction case causing
this.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1913913

Title:
  i386-linux-user returns -1 in sigcontext->trapno

Status in QEMU:
  New

Bug description:
  QEMU development version, git commit
  74208cd252c5da9d867270a178799abd802b9338. Behaviour has been noted in
  5.2.0 generally.

  Certain 16-bit windows programs crash WINE under QEMU linux-user with:

  0084:err:seh:segv_handler Got unexpected trap -1
  wine: Unhandled illegal instruction at address 00006D65 (thread 0084), 
starting debugger...

  They run correctly on native i386.

  Upon further inspection,it becomes clear these programs are failing at
  addresses where they are making DOS calls (int 21h ie CD 21 for
  instance).

  It is also clear that WINE is expecting an exception/signal at this
  point, to patch in the actual int21h handling code inside WINE.

  However, wine uses sigcontext output extensively to do its structured
  exception handling. sigcontext->trapno being set to -1 seems to
  confuse it, causing it to treat the exception as an actual unhandled
  error.

  I do not know if exception_index is being left at -1 due to the case
  of privileged instructions being executed in 16-bit ldts not being
  handled specifically, or if there is some other illegal instruction
  case causing this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1913913/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]