Comments (6)
Fixed, sorry about this. It's an unfortunate off-by-one bug which is triggered on the rare occasion that a build ends up exactly at the end of a 4096 page boundary. I'm a little surprised I never encountered this bug in my own projects; I guess I tend to keep my builds fairly small so my nested builds never roll over a page.
I'm having trouble crafting a unit test that will reproduce this. The tests currently set a very small page size to test various wrapping behaviors but this size makes it impossible for a build to be aligned at the end. I'll have to make the page size vary by unit test. I will keep this open until it's properly unit tested.
from mpack.
Thanks for the very quick fix!
can't we add the current example above to the unit tests as a regression test, at least until a more specific way to test this has been implemented?
from mpack.
Your example doesn't trigger the bug in the unit test suite because the unit tests use small page sizes to test various wrapping behaviors. I need to change the unit test runner to make the page size configurable to properly test this. It also needs to be optimized and simplified. The unit test suite is run under Valgrind so unit tests need to be as fast as possible.
from mpack.
Yes, that was quick. And now, everything works perfectly. Thanks a lot for your great work!
from mpack.
I think I stumbled over this, using v1.1. I haven't confirmed it, but the problem seems very similar and it was fixed by switching to the develop branch. It would be great, if this could be fixed with a new stable release.
from mpack.
Release v1.1.1 is out. Sorry for the delay. I'll leave this open because I still want to improve the unit tests for this.
from mpack.
Related Issues (20)
- Stream reader with manual memory management? HOT 2
- comparison with libmpack HOT 1
- Warning about incompatible int types in mpack_snprintf calls HOT 1
- ESP32-C3 rebooting when executing functions from the MPack library
- Stream parser that doesn't buffer the entire message
- tools/unit.sh help - does not work
- How to know the end of message pack in serial communication? HOT 1
- memory error on avr (arduino uno)
- File IO incompatible with custom context HOT 2
- Suggestions for warnings? HOT 3
- mpack crashes without a matching call to mpack_complete_* HOT 3
- Node API for read+write? HOT 1
- How to change the data with node API? Or how to write fast when I know the data offset or giving node? HOT 2
- get nothing if prev node is nil HOT 3
- Make it possible to use a dynamic buffer with mpack writer HOT 2
- Missing Symbolic Link HOT 1
- Should NULL data be allowed for mpack_write_str() with count of 0? HOT 1
- Error handler segfault HOT 1
- How can I get it header only? 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 mpack.