paulfloyd / freebsd_valgrind

Git repo used to Upstream the FreeBSD Port of Valgrind
GNU General Public License v2.0
15 stars 4 forks source link

SIGSEGV in drd/tests/sigaltstack [i386, FreeBSD 12.1 and 12.2] #151

Closed paulfloyd closed 2 years ago

paulfloyd commented 3 years ago

Perhaps since the fix for issue #57 this testcase is producing a crash.

On amd64, running with -v4 --d4 --trace-syscalls=yes this gives

SYSCALL,1 sys_write ( 2, 0x.... 18 ) --> [async] ... setting sigaction SYSCALL,1 ... [async] --> Success(0x12) SYSCALL,1 sys_sigprocmask ( 3, 0x...., 0x.... ) --> [pre-success] Success(0x0) SYSCALL,1 sys_sigaction ( 30, 0x...., 0x.... ) --> [pre-success] Success(0x0) SYSCALL,1 sys_sigprocmask ( 3, 0x...., 0x0 ) --> [pre-success] Success(0x0) SYSCALL,1 sys_write ( 2, 0x...., 8 ) --> [async] ... res = 0 SYSCALL,1 ... [async] --> Success(0x8) SYSCALL,1 sys_write ( 2, 0x...., 19 ) --> [async] ... raising the signal SYSCALL,1 ... [async] --> Success(0x13) SYSCALL,1 sys_thr_self ( 0x.... ) [sync] --> Success(0x0) SYSCALL,1 sys_thr_kill ( 101029, 30 ) --> [async] ... SYSCALL,1 sys_sigprocmask ( 3, 0x4cb0eac, 0x0 ) --> [pre-success] Success(0x0) SYSCALL,1 sys_write ( 2, 0x4cb03c0, 41 ) --> [async] ... caught signal, local var is on 0x4cb0ac8 SYSCALL,1 ... [async] --> Success(0x29) SYSCALL,1 sys_sigreturn ( 0x4cb0ae0 ) pid 15583 (drd-amd64-freebsd): sigreturn rflags = 0x0 [sync] --> Failure(0x16) SYSCALL,1 sys_sigreturn ( 0x4cb0f38 ) --> [pre-success] NoWriteResult SYSCALL15583,1 sys_write ( 2, 0x7fbfffc20, 5 ) --> [async] ... done SYSCALL15583,1 ... [async] --> Success(0x5) SYSCALL15583,1 exit( 0 ) --> [pre-success] Success(0x0)

and on i386

SYSCALL,1 sys_write ( 2, 0x.... 18 ) --> [async] ... setting sigaction SYSCALL,1 ... [async] --> Success(0x12) SYSCALL,1 sys_sigprocmask ( 3, 0x...., 0x.... ) --> [pre-success] Success(0x0) SYSCALL,1 sys_sigaction ( 30, 0x...., 0x.... ) --> [pre-success] Success(0x0) SYSCALL,1 sys_sigprocmask ( 3, 0x...., 0x0 ) --> [pre-success] Success(0x0) SYSCALL,1 sys_write ( 2, 0x...., 8 ) --> [async] ... res = 0 SYSCALL,1 ... [async] --> Success(0x8) SYSCALL,1 sys_write ( 2, 0x...., 19 ) --> [async] ... raising the signal SYSCALL,1 ... [async] --> Success(0x13) SYSCALL,1 sys_thr_self ( 0x.... ) [sync] --> Success(0x0) SYSCALL,1 sys_thr_kill ( 100304, 30 ) --> [async] ... ==55752== ==55752== Process terminating with default action of signal 11 (SIGSEGV): dumping core

So they are identical up to the sys_thr_kill

In the amd64 version, that [sync] --> Failure(0x16) is

define EINVAL 22 / Invalid argument /

or from the sigreturn manpage

 [EINVAL]           The process status longword is invalid or would
                    improperly raise the privilege level of the process.

Could be unrelated, and also looks similar to issue #137

paulfloyd commented 2 years ago

Number 4 for https://bugs.kde.org/show_bug.cgi?id=445032