check
sanitizers
check | sanitizers | |
---|---|---|
3 | 48 | |
1,039 | 10,826 | |
1.8% | 1.3% | |
0.0 | 6.3 | |
over 1 year ago | 10 days ago | |
C | C | |
GNU Lesser General Public License v3.0 only | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
check
-
How do you ensure your logic is correct for various inputs? Unit tests? Assert?
check
-
Unit testing for stdout/printf
I am using libcheck to write my unit tests in C. Unfortunately the library doesn't provide an easy way to verify what go written to stdout. I have a function that writes specific character sequences to the terminal using printf. The function doesn't return anything.
-
A rofi base shortcut helper (use remontoire configuration)
Running ./configure, make and make install inside the rofi-1.6.1 directory should go quite smoothly. If the configure complains that it requires the latest version of "check" (a utility that tests the source code for scripting errors) it can be downloaded from https://github.com/libcheck/check Note that check also has a few dependencies that have to be resolved.
sanitizers
-
Good resources for learning C in depth?
AddressSanitizer is really useful, it's similar to Valgrind but has much lower overhead.
-
Memory Allocators
And if you're up for it, I'd further recommend adding some ways to deal with buffer overflows in debug builds. The way I deal with this is by using Address-Sanitizer's manual poisoning api. Bonus point if you leave additional poisoned space between allocations so off by one errors are likely to end up in a poisoned region instead of nearby allocation.
- Exception thrown: write access violation
-
2023 Stack Overflow Survey: Rust is the most admired programming language, making it the most loved language for 8 years in a row
It also doesn't hurt that Miri can find many kinds of unsafe violations even in unsafe blocks. Zig may get something like this one day, but even if it does, checking things at runtime is not a substitute for compile time -- the C++ Sanitizers haven't exactly solved the safety story for C++ even over a decade later.
-
What's the best thing you've found in code? :
This is where stuff like ASan is really useful.
-
how do I check my library for memory leaks?
Use: https://github.com/google/sanitizers/wiki/AddressSanitizer
-
Is malloc_trim() safe to use?
Have you tried using tools like ASAN/LSAN or valgrind to confirm that there are indeed no memory leaks?
-
Having trouble with projects too long to post here.
Compile with ASAN and UBSAn
- Strange Segmentation Fault when accessing a Class inside a for loop.
- Will Carbon Replace C++?
What are some alternatives?
baloo - Expressive end-to-end HTTP API testing made easy in Go
miri - An interpreter for Rust's mid-level intermediate representation
Testify - A toolkit with common assertions and mocks that plays nicely with the standard library
spdlog - Fast C++ logging library.
go-fuzz - Randomized testing for Go
xeus-cling - Jupyter kernel for the C++ programming language
stop-and-go - Testing helper for concurrency
plotters - A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely 🦀 📈🚀
GoConvey - Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
Catch - A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
ginkgo - A Modern Testing Framework for Go
doctest - The fastest feature-rich C++11/14/17/20/23 single-header testing framework