Comments (4)
Are they any particular fixed-sized buffers which are causing problems? Some of the ones in src/link.c
and src/rt/jit.c
could be replaced with xasprintf
and a corresponding free
(wrapper in src/util.c
for asprintf
that aborts on failure).
I looked at libgc before but it's way over the top for this use. It causes all sorts of weird non-deterministic bugs and more importantly, is incompatible with Valgrind.
AddressSantitizer looks quite good as a memory checker and if using Clang it only needs an extra compiler flag to enable.
from nvc.
for fixed-sized buffers, maybe i can spoil them by using crazy VHDL source file which has very long identifier of entity (or file name?). IIRC, LRM does not mention about limitation about length of identifier. it looks you already set reasonable length for them, and i also expect sane users do not use very long identifier, but some HLS tools generate crazy ones, such as Vivado.
http://www.xilinx.com/support/answers/52787.htm
in fact, the above one is caused by Windows specific MAX_PATH limitation (I believe this can be fixed by using namespaces though). but this craze of HLS will produce more brilliant shits in near future, IMHO.
using xasprintf
looks nice for char, ill try it soonish.
for GC and memory checker, it looks you already have your own thoughts, so i have no objection about them.
P.S. ive updated the top post.
from nvc.
commit a0a9ba0 purges 20 temp buffers.
any idea for nuking others?
from nvc.
Thanks, I merged that commit. All fine except two little issues:
In _bounds_fail
the suffix
variable always gets passed to printf
so it has to be non-null or you end up with error messages like this:
** Fatal: array index 9 outside bounds 8 downto 0(null)
Fixed that in ab89cd8. It's OK to not free suffix
as _bounds_fail
never returns.
In loc_to_ident
it's possible we write past the end of the array. This function has always been kind of broken though. Fixed it with 462a33d.
I also changed a bunch of fixed size buffers in cgen.c to use xasprinf
too in 90cfa27. I don't think the remaining ones are anything to worry about at the moment.
from nvc.
Related Issues (20)
- UVVM-based testbenches and coverage
- External name and redeclared type definition HOT 2
- nvc elaboration error (SIGABRT) HOT 6
- nvc segfaults while generating the coverage report HOT 1
- PSL cover sequence split accross multiple lines
- PSL braces around sub-expression causing crash
- PSL sequence implication parsing error
- PSL property analysis fails when braces around it are missing
- PSL - Assert Never not supported
- generic package with impure function method. HOT 1
- generic package with impure function method. HOT 3
- Regression with alias of external name? HOT 4
- Compliance-Tests: tb_garbage_collection.all failed to suspend thread HOT 4
- OsvvmLibraries RunAllTests SetVHDLVersion 2019 SIGSEGV HOT 2
- 2008: Generic Package fails with signed type, but not integer HOT 1
- nvc crashes with generic package passed to generic map in entity instantiation HOT 1
- Generic Type resolving fails when using functions for range HOT 1
- Generic package instantiation with type from package HOT 4
- Crash related to unconstrained vector as a parameter in a procedure HOT 1
- Wrong value in generic constant when using slice name
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 nvc.