Comments (3)
Hmm, actually, the integer signedness branch passes almost all the tests now and doesn't have any overflows in that suite. Maybe the bug here was fixed?
from chibicc.
This still happens for my little animation program. The problem is that the in-memory stack (@rbp
) has a leak and eventually overflows and corrupts something, and that leads to a working-stack overflow. The problem is that brk();
in vectors means that the stack pointer is never decremented at the end of a function:
@screen_
.rbp LDZ2 #0002 SUB2 .rbp STZ2
(…)
BRK
POP2
#0000
@.L.return.screen
.rbp LDZ2 #0002 ADD2 .rbp STZ2
JMP2r
from chibicc.
Fixed, I suppose, by overhauling the Varvara vector API and getting rid of brk()
.
from chibicc.
Related Issues (20)
- Support unsigned integers
- Support unsigned integers HOT 1
- `char` shouldn't be aligned to 2 bytes HOT 1
- `char` return type doesn't work correctly HOT 2
- Support `asm()` HOT 1
- RST overflow in star.c HOT 3
- Support commas in declarations
- Move compiler source code into `src`
- Using Local variables HOT 3
- `unsigned short` is promoted to `signed int` even though it's the same size
- Support assignment between structs HOT 7
- Optimizations suggestions
- More ideas for optimizations
- Self-hosting (chibicc-uxn compiling itself) HOT 2
- `asm()` argument shouldn't be `data`
- zero left on data stack at the end of the program
- [bug?] function pointer typedefs don't seem to be usable HOT 1
- Accessing Values deep in the Stack
- optimization: Transmogrify addressing runes to their values?
- initialization only inits first 2 bytes HOT 1
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 chibicc.