The test case from the ARM Linux kernel thread does not work for me; GCC
allocates the VFP use in main to d8-d15 (since main is not a leaf
function).  The signal handler is allocated d0-d7 to corrupt, so main
does not notice.  It may depend on the GCC version.

To force the register allocation, I coded a similar testcase in
assembler.

Like the original testcase, alarm(2) is used to schedule a signal.

main is coded to call no functions in between setting d0 and checking it
(since the ABI allows d0-d7 to be corrupted in this case).

  * If the signal handler manages to corrupt d0, a message is printed
and the test terminates.

  * If no corruption is observed, main will simply loop forever and the
test will not terminate.

I get:

$ gcc -o vfp-sigtest vfp-sigtest.s
$ ./vfp-sigtest
Waiting for d0 to be corrupted...
<2 seconds later>
d0 corrupted.



** Attachment added: "Test case for VFP signal handler corruption"
   http://launchpadlibrarian.net/38752212/vfp-sigtest.s

-- 
VFP/NEON state is not preserved around signal handlers, causing state 
corruption between user processes
https://bugs.launchpad.net/bugs/507503
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to