Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid input pool[7] uint ids; crashes the compiler #136

Open
jhoehle opened this issue Jan 26, 2019 · 1 comment
Open

invalid input pool[7] uint ids; crashes the compiler #136

jhoehle opened this issue Jan 26, 2019 · 1 comment
Labels

Comments

@jhoehle
Copy link
Contributor

jhoehle commented Jan 26, 2019

Even though the input is invalid, the compiler ought to produce a meaningful error message, not a backtrace and internal bug:

C:\...\Documents\Céu-0.40\examples\pico-ceu\dist>..\..\..\run\lua53.exe
 ..\..\..\run\ceu.lua --pre --pre-input=..\bug-pool.ceu --ceu --ceu-features-pool=true
stack traceback:
        ..\..\..\run\ceu.lua:3943: in field 'asr'
        [... duplicate output elided, see below ...]
        ..\..\..\run\ceu.lua:7542: in main chunk
        [C]: in ?
..\..\..\run\lua53.exe: ..\..\..\run\ceu.lua:3944: bug (expected: ID_abs | found: ID_prim)
stack traceback:
        [C]: in function 'error'
        ..\..\..\run\ceu.lua:3944: in field 'asr'
        ..\..\..\run\ceu.lua:6910: in local 'mid'
        ..\..\..\run\ceu.lua:4159: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4153: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4197: in function <..\..\..\run\ceu.lua:4194>
        (...tail calls...)
        ..\..\..\run\ceu.lua:4153: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4153: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4153: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4153: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4153: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4153: in upvalue 'visit_aux'
        ..\..\..\run\ceu.lua:4153: in function <..\..\..\run\ceu.lua:4122>
        (...tail calls...)
        ..\..\..\run\ceu.lua:7542: in main chunk
        [C]: in ?

I'm using the downloaded pre-0.40 Céu binary package on MS-Windows 7. bug-pool.ceu contains solely pool[7] uint ids;

BTW, somehow another bug is that the backtrace is shown twice, isnt'it?

@fsantanna fsantanna added the bug label Jan 27, 2019
@fsantanna
Copy link
Collaborator

Sure, this is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants