This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

CVS 2.96 991020-snapshot: SIG11 in gc-common.c on Objective-C code


Hi!


I got SIG11 error while tried to compile the latest GNUStep code with
the lastest GNU  compiler.
It crashed on correct Objective-C code inside ggc_set_mark (p)  due to a
bad pointer
dereferenced (p == 0x1).

Unfortunatly I'm completely naive to gcc internals, so all I can do is
to submit a bug report.

A pointer came from ggc_mark_tree_children(), from a call to
ggc_mark_tree (DECL_RESULT (t))
while processing a decl tree node case (file ggc-common.c, line #360).

A dump of this tree node shows:

$3 = {common = {chain = 0x8446094, type = 0x8446364, code = 144,
    side_effects_flag = 0, constant_flag = 0, permanent_flag = 1,
    addressable_flag = 0, volatile_flag = 0, readonly_flag = 0,
    unsigned_flag = 0, asm_written_flag = 0, used_flag = 0, raises_flag
= 0,
    static_flag = 0, public_flag = 0, private_flag = 0, protected_flag =
0,
    lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0, lang_flag_3 = 0,
    lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0}, int_cst = {
    common = "\224`D\bdcD\b\220\004\000", rtl = 0x8440b04, int_cst_low =
120,
    int_cst_high = 2557}, real_cst = {common =
"\224`D\bdcD\b\220\004\000",
    rtl = 0x8440b04, real_cst = {r = {120, 2557, 0}}}, string = {
    common = "\224`D\bdcD\b\220\004\000", rtl = 0x8440b04, length = 120,

    pointer = 0x9fd <Address 0x9fd out of bounds>}, complex = {
    common = "\224`D\bdcD\b\220\004\000", rtl = 0x8440b04, real = 0x78,
    imag = 0x9fd}, identifier = {common = "\224`D\bdcD\b\220\004\000",
    length = 138676996, pointer = 0x78 <Address 0x78 out of bounds>},
decl = {
    common = "\224`D\bdcD\b\220\004\000",
    filename = 0x8440b04 "Foundation/NSString.h", linenum = 120, uid =
2557,
    size = 0x0, mode = VOIDmode, external_flag = 0, nonlocal_flag = 0,
    regdecl_flag = 0, inline_flag = 0, bit_field_flag = 0, virtual_flag
= 0,
    ignored_flag = 0, abstract_flag = 0, in_system_header_flag = 0,
    common_flag = 0, defer_output = 0, transparent_union = 0,
    static_ctor_flag = 0, static_dtor_flag = 0, artificial_flag = 0,
    weak_flag = 0, lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0,
    lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0,
    lang_flag_7 = 0, non_addr_const_p = 0,
    no_instrument_function_entry_exit = 0, no_check_memory_usage = 0,
    comdat_flag = 0, frame_size = {i = 1, u = 1, f = {code = 1, bclass =
0}},
    name = 0x8446554, context = 0x0, arguments = 0x8446464, result =
0x1,
    initial = 0x0, abstract_origin = 0x0, assembler_name = 0x0,
    section_name = 0x0, machine_attributes = 0x0, rtl = 0x0,
    live_range_rtl = 0x0, saved_insns = {f = 0x0, r = 0x0, i = 0},
    vindex = 0x0, pointer_alias_set = -1, lang_specific = 0x0}, type = {

    common = "\224`D\bdcD\b\220\004\000", values = 0x8440b04, size =
0x78,
    size_unit = 0x9fd, attributes = 0x0, uid = 0, precision = 0 '\000',
    mode = VOIDmode, string_flag = 0, no_force_blk_flag = 0,
    needs_constructing_flag = 0, transparent_union_flag = 0, packed_flag
= 0,
    restrict_flag = 0, lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 =
0,
    lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0,
    align = 1, pointer_to = 0x8446554, reference_to = 0x0, symtab = {
    address = 138699876, pointer = 0x8446464 ""}, name = 0x1, minval =
0x0,
    maxval = 0x0, next_variant = 0x0, main_variant = 0x0, binfo = 0x0,
    noncopied_parts = 0x0, context = 0x0, obstack = 0x0, alias_set = 0,
    lang_specific = 0xffffffff}, list = {common =
"\224`D\bdcD\b\220\004\000",
    purpose = 0x8440b04, value = 0x78}, vec = {
    common = "\224`D\bdcD\b\220\004\000", length = 138676996, a =
{0x78}},
    exp = {common = "\224`D\bdcD\b\220\004\000", complexity = 138676996,

    operands = {0x78}}, block = {common = "\224`D\bdcD\b\220\004\000",
    handler_block_flag = 0, abstract_flag = 0, live_range_flag = 1,
    live_range_var_flag = 0, vars = 0x78, type_tags = 0x9fd, subblocks =
0x0,
    supercontext = 0x0, abstract_origin = 0x0, end_note = 0x1,
    live_range_start = 138700116, live_range_end = 0}}


Command arguments to gcc:

$ gcc -Q -v -B/home/src/egcs-ia32/gcc/ -c
-DGNUSTEP_INSTALL_PREFIX=/usr/GNUstep
-DGNUSTEP_TARGET_DIR=\"ix86/linux-gnu\" -DGNUSTEP_TARGET_CPU=\"ix86\"
-DGNUSTEP_TARGET_OS=\"linux-gnu\" -DLIBRARY_COMBO=\"gnu-gnu-gnu-xgps\"
-Wall -DGNUSTEP -DGNUSTEP_VERSION=0.6.0 -DGNUSTEP_MAJOR_VERSION=0
-DGNUSTEP_MINOR_VERSION=6 -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1
-DXGPS_BACKEND_LIBRARY=1 -DGNU_RUNTIME=1 -D_REENTRANT  -fPIC
-mcpu=pentiumpro -O2 -g -pipe -Wno-import -fgnu-runtime
-I../Headers/gnustep -I./ix86/linux-gnu    -I. -I/usr/local/include
-I/usr/local/include -I/usr/X11R6/include
-I/usr/GNUstep/Network/Headers -I/nowhere/Headers   BinaryCStream.m

Reading specs from /home/src/egcs-ia32/gcc/specs
gcc version 2.96 19991015 (experimental)
 /home/src/egcs-ia32/gcc/cpp -lang-objc -v -I../Headers/gnustep
-I./ix86/linux-gnu -I. -I/usr/local/include -I/usr/local/include
-I/usr/X11R6/include -I/usr/GNUstep/Network/Headers -I/nowhere/Headers
-isystem /home/src/egcs-ia32/gcc/include -D__OBJC__ -D__GNUC__=2
-D__GNUC_MINOR__=96 -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__
-D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix)
-D__OPTIMIZE__ -g -Wall -Wno-import -Acpu(i386) -Amachine(i386) -Di386
-D__i386 -D__i386__ -D__tune_pentiumpro__ -D__PIC__ -D__pic__
-DGNUSTEP_INSTALL_PREFIX=/usr/GNUstep
-DGNUSTEP_TARGET_DIR="ix86/linux-gnu" -DGNUSTEP_TARGET_CPU="ix86"
-DGNUSTEP_TARGET_OS="linux-gnu" -DLIBRARY_COMBO="gnu-gnu-gnu-xgps"
-DGNUSTEP -DGNUSTEP_VERSION=0.6.0 -DGNUSTEP_MAJOR_VERSION=0
-DGNUSTEP_MINOR_VERSION=6 -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1
-DXGPS_BACKEND_LIBRARY=1 -DGNU_RUNTIME=1 -D_REENTRANT BinaryCStream.m |
 /home/src/egcs-ia32/gcc/cc1obj -dumpbase BinaryCStream.m
-mcpu=pentiumpro -g -O2 -Wall -Wno-import -version -fPIC -fgnu-runtime
-lang-objc -o - |
 as -V -Qy -o BinaryCStream.o -
GNU CPP version 2.96 19991020 (experimental) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 ../Headers/gnustep
 ix86/linux-gnu
 .
 /usr/local/include
 /usr/X11R6/include
 /home/src/egcs-ia32/gcc/include
 /usr/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/../../../../i686-pc-linux-gnu/include

 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include
 /usr/include
End of search list.
The following default directories have been omitted from the search
path:
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/../../../../include/g++-3
End of omitted list.
GNU Obj-C version 2.96 19991020 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 2.96 19991015 (experimental).
options passed:  -mcpu=pentiumpro -g -O2 -Wall -Wno-import -fPIC
 -fgnu-runtime -lang-objc
options enabled:  -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
 -fexpensive-optimizations -fthread-jumps -fstrength-reduce -fpeephole
 -fforce-mem -ffunction-cse -finline -fkeep-static-consts -fcaller-saves

 -fpcc-struct-return -fgcse -frerun-cse-after-loop -frerun-loop-opt
 -fdelete-null-pointer-checks -fschedule-insns2 -fsched-interblock
 -fsched-spec -fPIC -fnew-exceptions -fcommon -fgnu-linker -fregmove
 -foptimize-register-move -fargument-alias -fstrict-aliasing -fident
 -fpeephole2 -fmath-errno -m80387 -mhard-float -mno-soft-float -mieee-fp

 -mfp-ret-in-387 -mcpu=pentiumpro
GNU assembler version 2.9.5 (i686-pc-linux-gnu) using BFD version
2.9.5.0.16
 strtod strtol strtoul strtoq strtouq strtoll strtoull atof atoi atol
atoll sel_eq hash_ptr hash_string compare_ptrs compare_strings vprintf
In file included from /usr/include/stdio.h:631,
                 from
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/objc-api.h:33,
                 from ../Headers/gnustep/base/preface.h:65,
                 from BinaryCStream.m:25:
/usr/include/bits/stdio.h: In function `vprintf':
/usr/include/bits/stdio.h:35: warning: format not a string literal,
argument types not checked
 getchar getc_unlocked getchar_unlocked putchar fputc_unlocked
putc_unlocked putchar_unlocked feof_unlocked ferror_unlocked
class_get_class_name class_get_instance_size class_get_meta_class
class_get_super_class class_get_version class_is_class
class_is_meta_class class_set_version class_get_gc_object_type
method_get_imp object_get_class object_get_class_name
object_get_meta_class object_get_super_class object_is_class
object_is_instance object_is_meta_class tolower toupper soffset_decode
soffset_encode sarray_get sarray_get_safe NSDefaultMallocZone
GSAtomicMallocZone NSZoneMalloc NSZoneRealloc NSRecycleZone NSZoneFree
NSZoneName NSZoneMallocAtomic NSZoneCheck NSZoneStats NSMaxRange
NSLocationInRange NSEqualRanges NSUnionRange NSIntersectionRange __sgn
__sgnf __sgnl __pow2 __pow2f __pow2l __sincos __sincosf __sincosl
__expm1l exp expf expl __expl tan tanf tanl atan2 atan2f atan2l __atan2l
fmod fmodf fmodl pow powf powl sqrt sqrtf sqrtl __sqrtl fabs fabsf fabsl
__fabsl sin sinf sinl cos cosf cosl atan atanf atanl log logf logl log10
log10f log10l asin asinf asinl acos acosf acosl __sgn1l sinh sinhf sinhl
cosh coshf coshl tanh tanhf tanhl floor floorf floorl ceil ceilf ceill
ldexp expm1 expm1f expm1l log1p log1pf log1pl asinh asinhf asinhl acosh
acoshf acoshl atanh atanhf atanhl hypot hypotf hypotl logb logbf logbl
drem dremf dreml __finite __coshm1 __coshm1f __coshm1l __acosh1p
__acosh1pf __acosh1pl __cmsg_nxthdr +[BinaryCStream initialize]
+[BinaryCStream setDebugging:] +[BinaryCStream debugStderrCoder]
-[BinaryCStream
_initForReadingFromPostSignatureStream:withFormatVersion:]
-[BinaryCStream initForWritingToStream:withFormatVersion:]
-[BinaryCStream encodeValueOfCType:at:withName:] -[BinaryCStream
decodeValueOfCType:at:withName:] {GC 5499k -> gcc: Internal compiler
error: program cc1obj got fatal signal 11
{standard input}: Assembler messages:
{standard input}:3728: Warning: end of file not at end of a line;
newline inserted
{standard input}:4060: Warning: .stabn: Missing comma


And the preprocessed source follows:


BinaryCStream.i.gz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]