Wine and Valgrind / handling SIGILL
Sebastian Lackner
sebastian at fds-team.de
Thu Jan 19 21:40:16 CST 2017
On 19.01.2017 20:30, Julian Seward wrote:
>
> Hi Sebastian,
>
>> The Valgrind bugtracker also contains three patches I proposed back then. I
>> was hoping that this would speed up the process of getting this fixed, but
>> unfortunately it didn't help much. At many places Valgrind does not yet
>> handle signal registers correctly and doesn't complain - except here, which
>> is really unfortunate because even ignoring would be sufficient to make Wine
>> happy.
>
> Sorry this fell through the cracks. One underlying problem is that, some
> time back in 2003, I learnt just enough about x86 segment stuff to hack up
> what's currently in Valgrind, and then promptly forgot about it. So I'm
> not in much of a position to make an informed judgement now.
>
> That said .. I would be OK with a partial fix which improves Valgrind's
> SS handling enough to make Wine work, so long as it doesn't create a
> situation where other cases are silently handled incorrectly. That is,
> if the fix only moves forwards on the correctness scale, and doesn't
> introduce any regressions.
>
> On rereading https://bugs.kde.org/show_bug.cgi?id=344139#c1 I see that you
> have a candidate patch (http://ix.io/gKt, "Correctly handle the SS prefix
> when explicitly specified.") which appears to have the abovementioned
> properties. Is that correct?
>
> J
>
As discussed on IRC, this direction probably makes most sense. In contrast to
the other approaches, no special handling for the SS segment is required -
nevertheless, we have to initialize some GDT entries to make this work.
I have attached a new series which is hopefully less hacky:
https://bugs.kde.org/show_bug.cgi?id=344139#c3 (*)
https://bugs.kde.org/show_bug.cgi?id=344139#c4
(*) On some systems the segment for DS and SS is the same, but initializing
twice shouldn't hurt.
For me it fixes the Wine tests (@Austin: Could you confirm?).
Please let me know if you have any other suggestions for improvement (either
here or on the bugtracker). Thanks!
Best regards,
Sebastian
More information about the wine-devel
mailing list