Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[ICE] no stopping condition for aggregate_initializer #408

Open
jyn514 opened this issue May 6, 2020 · 0 comments
Open

[ICE] no stopping condition for aggregate_initializer #408

jyn514 opened this issue May 6, 2020 · 0 comments
Labels
analyzer Issue with semantic analysis fuzz Found via fuzz testing ICE Internal Compiler Error (panic) initialization static initialization structs Struct errors are the most common lately by far

Comments

@jyn514
Copy link
Owner

jyn514 commented May 6, 2020

Code

struct D { struct D segs[]; }bar (struct D *svp)
{
svp->segs[asi];
}

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

Expected behavior

<stdin>:1:25: error: array has incomplete element type 'struct D'
struct D { struct D segs[]; }bar (struct D *svp)
                        ^
<stdin>:1:8: note: definition of 'struct D' is not complete until the closing '}'
struct D { struct D segs[]; }bar (struct D *svp)
       ^
Backtrace
#9  0x00005555558b36a2 in rcc::arch::<impl rcc::data::types::struct_ref::StructType>::align (warning: (Internal error: pc 0x5555558b36a1 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x5555558b36a1 in read in psymtab, but not in symtab.)

self=0x555555f757c8) at src/arch/mod.rs:83
#10 0x00005555558bb42b in rcc::arch::<impl rcc::data::types::Type>::alignof (
    self=0x555555f757c0) at src/arch/mod.rs:155
#11 0x00005555558bb417 in rcc::arch::<impl rcc::data::types::Type>::alignof (
    self=0x555555f71250) at src/arch/mod.rs:151
#12 0x00005555559b0a09 in rcc::arch::<impl rcc::data::types::struct_ref::StructType>::align::{{closure}} (max=0, member=0x555555f71250) at src/arch/mod.rs:85
#13 0x0000555555a0d825 in core::iter::traits::iterator::Iterator::try_fold (warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x5555558b3680 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)


self=0x7fffff7ff588, warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

init=0, warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

f=...)
    at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libcore/iter/traits/iterator.rs:1877
warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

#14 0x00005555558b377c in rcc::arch::<impl rcc::data::types::struct_ref::StructType>::align (warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x5555558b377b in read in psymtab, but not in symtab.)

self=0x555555f757c8) at src/arch/mod.rs:84
#15 0x00005555558bb42b in rcc::arch::<impl rcc::data::types::Type>::alignof (
    self=0x555555f757c0) at src/arch/mod.rs:155

cc @hdamron17 , this is the same issue with not recognizing incomplete types.

@jyn514 jyn514 added structs Struct errors are the most common lately by far initialization static initialization ICE Internal Compiler Error (panic) fuzz Found via fuzz testing analyzer Issue with semantic analysis labels May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
analyzer Issue with semantic analysis fuzz Found via fuzz testing ICE Internal Compiler Error (panic) initialization static initialization structs Struct errors are the most common lately by far
Projects
None yet
Development

No branches or pull requests

1 participant