[Bug c++/13836] New: Illegal instruction calling function pointer
sdowning at fame dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 23 18:43:00 GMT 2004
A coredump resulting from an illegal instruction occurs when calling a function
pointer corresponding to a function in a separate module that contains a static,
statically initialized (with non-zero values) array of characters.
The module driver.cc contains a static array of characters. The macro
EXHIBIT_SYMPTOM can be set to 0 to cause the symptom to go away.
The symptom can also be suppressed by
1) Initializing the array to zero values
2) Moving the array before the driver function
3) Declaring the array global rather than static
The symptom in the test case only occurs in the debug build (see build_run.sh)
but in the larger program that precipitated the test case, the symptom occurs in
non-debug builds as well. I have been able to workaround this issue by making
sure any functions pointed to are defined at the end of the module.
--
Summary: Illegal instruction calling function pointer
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sdowning at fame dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-ibm-aix5.1.0.0
GCC host triplet: powerpc-ibm-aix5.1.0.0
GCC target triplet: powerpc-ibm-aix5.1.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13836
More information about the Gcc-bugs
mailing list