summary refs log tree commit diff stats
path: root/results/classifier/zero-shot-user-mode/instruction/1791763
blob: 7afe07140227c9aae1f405ca2a47c4c5d0507e71 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
instruction: 0.474
syscall: 0.282
runtime: 0.244



broken signal handling in nios2 user-mode emulation

This bug is against the 3.0 release.

It appears that the signal handling parts of the nios2 user-mode emulation have never really been completed or tested.  Some examples of failing tests from the GCC testsuite are gcc.dg/pr78185.c and gcc.dg/cleanup-10.c.

Some problems I've identified and tried to fix with the attached patch are:

- Code copied from the Linux kernel wasn't adjusted to differentiate between host and target data types and address spaces.

- The sigaltstack() system call returns EINVAL because fields are listed in the wrong order in struct target_sigaltstack.

With this patch, the system calls to set up the signal handler are returning successfully, but the handler isn't being invoked, so something is still wrong.  I think I need another pair of eyes to look over this code.