On Sun, Jan 01, 2023 at 11:05:18AM +0100, Willy Tarreau wrote:
To be precise I have this on gcc 10 in Debian:
during GIMPLE pass: fre drivers/media/pci/cx18/cx18-i2c.c: In function 'init_cx18_i2c': drivers/media/pci/cx18/cx18-i2c.c:300:1: internal compiler error: Segmentation fault 300 | }
As Greg said it's definitely a compiler bug, so it will interest Gcc developers, or your distro's gcc package maintainers in case it's not up to date. There are toolchains available on kernel.org here:
https://mirrors.edge.kernel.org/pub/tools/crosstool/
The laest 10.x available is 10.4. If it works with this one it may indicate that your package is lacking some recent fixes, so it might be a question for your distro's gcc package maintainers. If it fails it indicates a bug not yet fixed in gcc and your distro maintainers won't be of any help here, you'll have to report it to the gcc devs instead.
Note that they'll very likely ask about a reproducer (and most likely your config). But a quick test for me with this driver built as a module on x86_64 with gcc-10.4 from kernel.org doesn't show any problem:
$ make CROSS_COMPILE=/f/tc/nolibc/gcc-10.4.0-nolibc/x86_64-linux/bin/x86_64-linux- drivers/media/pci/cx18/cx18-i2c.o (...) CC [M] drivers/media/pci/cx18/cx18-i2c.o $ ll drivers/media/pci/cx18/cx18-i2c.o -rw-rw-r-- 1 willy users 33920 Jan 1 11:00 drivers/media/pci/cx18/cx18-i2c.o
Hi Willy,
I can confirmed that no segfault reported when compiling x86_64-defconfig + CONFIG_VIDEO_CX18 using default gcc from Debian 11, so this can be hardware issues.
Thanks.