Comments (8)
There are no recoverable exceptions in Céu, i.e., the program should terminate with the message.
However, the segfault
shouldn't happen in any case.
from ceu.
Ok, I just expected the program to escape 42 because of the following example:
var u8[2] foo;
foo = [] .. foo .. [4];
foo = [] .. foo .. [2];
foo = [] .. foo .. [7];
escape 42;
In this case obviously an access out of bounds error appears but the program nonetheless escapes 42:
[application.ceu:5] runtime error: access out of bounds
*** END: 42
So should it always terminate immediately after a runtime error message?
from ceu.
Yes, immediately.
Can you try to compile the final .c
with -DCEU_DEBUG
?
I think this is the whole problem. The underlying assert
is not being called, which explains the segfault
and also why my tests aren't catching such a simple bug.
from ceu.
Sure. This leads to the following output:
(0): 1
(1): 2
(2): 3
(3): 4
[application.ceu:4] runtime error: access out of bounds
a.out: application.ceu:3558: ceu_sys_assert: Assertion `v' failed.
Aborted (core dumped)
from ceu.
Ok. Now the behavior is correct and the error also appears in the correct line.
I'll leave this issue open because of the -DCEU_DEBUG
requirement.
from ceu.
Just as a complementary:
Now also the behaviour of the other example is correct...
var u8[2] foo;
foo = [] .. foo .. [4];
foo = [] .. foo .. [2];
foo = [] .. foo .. [7];
escape 42;
now leads to
[application.ceu:5] runtime error: access out of bounds
a.out: application.ceu:3557: ceu_sys_assert: Assertion `v' failed.
Aborted (core dumped)
means that it is terminated immediately after the error message without escaping 42 - as you specified!
from ceu.
Can you confirm if these applications crash with the correct message (even without -DCEU_DEBUG
)?
from ceu.
Yes. Both examples crash with the correct assertion message even without -DCEU_DEBUG.
from ceu.
Related Issues (20)
- Add support for `while` loop
- Bug in Compiler
- Accept `until` for `code/await`
- http://fsantanna.github.io/* should be http://ceu-lang.github.io/* HOT 1
- Bad message for error regarding prototype declaration and code/call HOT 1
- Error with code/dynamic using multiple trails
- "Invalid binding : incompatible scopes" error not being detected inside watching statement
- Unexpected error with dynamic spawn before subtype declaration
- Instructions in INSTALL.md seem outdated
- Example 15 from "Try Ceu" page isn't correct HOT 3
- invalid input pool[7] uint ids; crashes the compiler HOT 1
- loop x in [a->b] tags x as constant but remains set after loop exits HOT 1
- Correct #line numbers HOT 1
- Integrate run-time assertions with Céu Exceptions HOT 1
- Use "kill" command makes application terminates unexpectedly HOT 2
- await for a code/await abstraction inside every does not produce errors HOT 1
- Wrong error message on call method without 'call'. HOT 1
- C comments don't ignore interpolated Céu expressions
- Events declared as a public fields don't work when using code/await prototype
- gcc -O1 and async/thread
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ceu.