ffmpeg/tests
Martin Storsjö 65739691b9 checkasm: Generalize crash handling
This replaces the riscv specific handling from
7212466e73 (which essentially is
reverted), with a different implementation of the same (plus a bit
more), based on the corresponding feature in dav1d's checkasm,
supporting both Unix and Windows.

See in particular the dav1d commits
0b6ee30eab2400e4f85b735ad29a68a842c34e21,
0421f787ea592fd2cc74c887f20b8dc31393788b,
8501a4b20135f93a4c3b426468e2240e872949c5 and
d23e87f7aee26ddcf5f7a2e185112031477599a7, authored by Henrik Gramner.

The overall approach compared to the existing implementation for
riscv is the same; set up a signal handler, store the state with
sigsetjmp, jump out of the crashing function with siglongjmp.

The main difference is in what happens when the signal handler
is invoked. In the previous implementation, it would resume from
right before calling the crashing function, and then skip that call
based on the setjmp return value.

In the imported implementation from dav1d, we return to right before
the check_func() call, which will skip testing the current function
(as the pointer is the same as it was before).

Other differences are:
- Support for other signal handling mechanisms (Windows
  AddVectoredExceptionHandler)
- Using RtlCaptureContext/RtlRestoreContext instead of setjmp/longjmp
  on Windows with SEH
- Only catching signals once per function - if more than one
  signal is delivered before signal handling is reenabled, any
  signal is handled as it would without our handler
- Not using an arch specific signal handler written in assembly

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-11 14:48:53 +02:00
..
api
checkasm checkasm: Generalize crash handling 2024-01-11 14:48:53 +02:00
fate fate/mov: force the native av1 decoder for the avif tests 2024-01-09 20:45:01 -03:00
filtergraphs
maps fate: Add fsync filter tests 2024-01-05 09:29:05 +01:00
ref avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields 2024-01-10 23:33:02 +01:00
.gitignore
Makefile fate: Add fsync filter tests 2024-01-05 09:29:05 +01:00
audiogen.c
audiomatch.c
base64.c
copycooker.sh
extended.ffconcat
fate-run.sh
fate-valgrind.supp
fate.sh fate: Allow running multiple rounds of tests with differing settings 2023-12-19 13:34:25 +02:00
md5.sh
refcmp-metadata.awk
reference.pnm
rotozoom.c
simple1.ffconcat
simple2.ffconcat
test.ffmeta
tiny_psnr.c
tiny_ssim.c
utils.c
videogen.c