GCC 4.7.4 Release 6: Out of memory allocating X bytes after a total of Y bytes crash
Paolo Fabio Zaino (28) 1853 posts |
Hi everyone, cc1: out of memory allocating 4072 bytes after a total of 33529856 bytes. Managed to dodge this error a few weeks ago by dialing back on warning flags, but after adding more code recently, the crash is back with vengeance. I’m pretty much at a dead end with the current minimal flags: gcc -Wall -Wextra -std=gnu99 -O2 -march=native -mtune=native -fno-stack-protector -fno-common -flto=auto -DUVM_USE_ASM=1 -Ilibs -I@.^.libs.zvector -I@.^.libs.zvector.src -fno-reorder-blocks -fno-reorder-blocks-and-partitions -c umm_vm.c -o umm_vm.o Only getting 2 warnings about some unused functions, nothing else. The crash seems to happen when cc1 is doing its DA memory allocations, but it’s hard to catch in the act (it happens really quickly). My project uses computed goto for threaded code, which works fine elsewhere. Apart from that, it’s strict ANSI C99 and compiles without a hitch on a bunch of different compilers and platforms (GCC 13 on Linux, Mac, BSD, Xcode/Clang on the Mac, Clang 12, older GCC versions on Linux, and even on the Amiga!). I’m suspecting it’s something specific to GCC’s behavior on RISC OS, especially since disabling computed gotos seems to bypass the issue. Tests and SAST/DAST code analysis tools show no problems on other OSes. I have tried to send this on the GCC mailing list, but I am getting an SMTP error: SMTP error from remote server for RCPT TO command, host: gccsdk.riscos.info () reason: 550 relay not permitted So, last resort to post this here. Not sure if any of the GCC guys can read this, but in case, it would be nice to understand why this is happening. Thanks in advance for the help! |