Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jun 2023 15:24:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 272149] mc_trapno incorrectly reports 0xc instead of 0xe
Message-ID:  <bug-272149-99@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272149

            Bug ID: 272149
           Summary: mc_trapno incorrectly reports 0xc instead of 0xe
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: standards
          Assignee: standards@FreeBSD.org
          Reporter: doctorwhoguy@gmail.com

I'm filing this bug on behalf of someone else who understands the issue bet=
ter
than I, so I'll try to give the relevant info but can get more if necessary=
. I
asked for a brief description:

"When SIGSEGV is delivered due to a page fault, freebsd sets mc_trapno
sigcontext member to 0xc, as if it was a stack fault. But mc_addr and mc_err
are the correct values corresponding to a page fault (for stack fault they'=
d be
entirely different), so simply changing mc_trapno from 0xc to 0xe by hands,
allows the JIT to work. This means the bug is very simple: freebsd just
corrupts the mc_trapno value somehow. If it be something more complex, like=
 a
real stack fault in between, then simply fixing up the mc_trapno would not
help, but it does."

Here is a test case:
https://github.com/dosemu2/dosemu2/commit/180184d2efa8f80db60330f823cfa1bc9=
b9e40f2

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272149-99>