Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1918767
Summary: | gcc crashes: lto1: fatal error: Cgraph edge statement index out of range | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Richard W.M. Jones <rjones> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 34 | CC: | aoliva, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc, sipoyare |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 910269 |
Description
Richard W.M. Jones
2021-01-21 14:27:07 UTC
Patch available upstream: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563416.html Smaller test case: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <error.h> static unsigned int argtoint (const char *prog, const char *arg); int main (void) { printf ("%u\n", argtoint ("hello", "world")); exit (0); } static unsigned int argtoint (const char *prog, const char *arg) { long int res; char *endptr; errno = 0; res = strtol (arg, &endptr, 10); if (errno || *endptr) error (EXIT_FAILURE, 0, "cannot parse integer argument '%s'", arg); return (unsigned int) res; } ----- $ gcc -fanalyzer -fno-common -Wall -Warith-conversion -Wbad-function-cast -Wcast-align=strict -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wformat-signedness -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wopenmp-simd -Wpointer-arith -Wstrict-overflow -Wstrict-prototypes -Wsuggest-attribute=cold -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-final-methods -Wsuggest-final-types -Wsync-nand -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunused-macros -Wvariadic-macros -Wvector-operation-performance -Wwrite-strings -Warray-bounds=2 -Wattribute-alias=2 -Wformat-overflow=2 -Wformat=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2 -Wunused-const-variable=2 -Wno-analyzer-double-free -Wno-analyzer-malloc-leak -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free -Wno-unused-parameter -Wno-missing-field-initializers -fdiagnostics-show-option -Wframe-larger-than=6000 -Wstack-usage=10000 -Wimplicit-fallthrough=4 -Wformat-truncation=1 -Wformat-overflow=1 -Wno-pragmas -Werror -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fno-strict-overflow -Wno-strict-overflow -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o argtoint argtoint.c argtoint.c: In function ‘argtoint’: argtoint.c:9:5: fatal error: Cgraph edge statement index out of range 9 | int main (void) { printf ("%u\n", argtoint ("hello", "world")); exit (0); } | ^ compilation terminated. make: *** [/tmp/ccuwY2M0.mk:2: /tmp/ccDvJlVX.ltrans0.ltrans.o] Error 1 lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Thanks, is this going to be fixed by https://koji.fedoraproject.org/koji/buildinfo?buildID=1671837 ? It doesn't look like this fix is mentioned in the %changelog. (In reply to Richard W.M. Jones from comment #3) > Thanks, is this going to be fixed by > https://koji.fedoraproject.org/koji/buildinfo?buildID=1671837 ? > > It doesn't look like this fix is mentioned in the %changelog. Right, I think the patch hasn't yet been approved. But hopefully it will be soon. A workaround is to turn off -fanalyzer. The patch isn't in upstream git yet; looks like I need to respond to comments from Honza on the upstream mailing list This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34. |