piccololang / piccolo Goto Github PK
View Code? Open in Web Editor NEWPiccolo Programming Language
License: MIT License
Piccolo Programming Language
License: MIT License
This feels like undesirable behaviour? Since most other internal errors produce a graceful exit - whereas with this the following happens:
Could not load package asd
[1] 19239 segmentation fault (core dumped) build/piccolo asd
The error is acknowledged but the engine still crashes.
The issue seems to be that the engine tries to run the package despite the failed load:
...
86 engine->hadError = false;
87 while(true) {
88 engine->frames[engine->currFrame].prevIp = engine->frames[engine->currFrame].ip;
-> 89 piccolo_OpCode opcode = READ_BYTE();
90 switch(opcode) {
91 case PICCOLO_OP_RETURN:
92 engine->currFrame--;
And the backtrace
* thread #1, name = 'piccolo', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
* frame #0: 0x000055555555a652 piccolo`run(engine=0x00007fffffefae10) at engine.c:89:33
frame #1: 0x000055555555e317 piccolo`piccolo_executeBytecode(engine=0x00007fffffefae10, bytecode=0x0000555555567868) at engine.c:550:12
frame #2: 0x000055555555e26a piccolo`piccolo_executePackage(engine=0x00007fffffefae10, package=0x0000555555567850) at engine.c:541:19
frame #3: 0x000055555555591c piccolo`main(argc=2, argv=0x00007fffffffdf58) at main.c:154:9
I think a solution to this could be to just error-out of the program or to at least report to the caller if the loading failed and not to continue to initialize the package
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.