Alex Bennée <alex.ben...@linaro.org> writes:

> Alex Bennée <alex.ben...@linaro.org> writes:
>
>> This adds a simple signal test that combines the POSIX timer_create
>> with signal delivery across multiple threads.
>>
>> [AJB: So I wrote this in an attempt to flush out issues with the
>> s390x-linux-user handling. However I suspect I've done something wrong
>> or opened a can of signal handling worms.
>>
>> Nominally this runs fine on real hardware but I variously get failures
>> when running it under translation and while debugging QEMU running the
>> test. I've also exposed a shortcomming with the gdb stub when dealing
>> with guest TLS data so yay ;-). So I post this as an RFC in case
>> anyone else can offer insight or can verify they are seeing the same
>> strange behaviour?]
>
> To further document my confusion:
>
>   gdb --args $QEMU ./tests/tcg/$ARCH/signals
>
> will SEGV in generated code for every target I've run. This seems to be
> some sort of change of behaviour by running inside a debug
> environment.

This bit at least seems to be triggered by the page protections for
detecting SMC - I think. If you skip past them it triggers:

    if (is_write && info->si_signo == SIGSEGV && info->si_code == SEGV_ACCERR &&
        h2g_valid(address)) {
        switch (page_unprotect(h2g(address), pc)) {

and runs.

-- 
Alex Bennée

Reply via email to