johnsonjh / duma Goto Github PK
View Code? Open in Web Editor NEWduma: Detect Unintended Memory Access (D.U.M.A.) - A Red-Zone memory allocator
Home Page: https://github.com/johnsonjh/duma
License: GNU General Public License v2.0
duma: Detect Unintended Memory Access (D.U.M.A.) - A Red-Zone memory allocator
Home Page: https://github.com/johnsonjh/duma
License: GNU General Public License v2.0
i don't know if anyone had a look or tried detours or kduma for many many years?:
thus, i would suggest to move the detours folder and kduma into some "attic" subfolder
config for long int sysconf (int parameter) Function This function is used to inquire about runtime system parameters. The parameter argument should be one of the SC symbols listed below. The normal return value from sysconf is the value you requested. A value of -1 is returned both if the implementation does not impose a limit, and in case of an error. The following errno error conditions are defined for this function:
EINVAL The value of the parameter is invalid.
enums: _SC_PAGESIZE Inquire about the virtual memory page size of the get page size returns the same value (see Query Memory Parameters). _SC_PHYS_PAGES Inquire about the number of physical pages in the system. _SC_AVPHYS_PAGES Inquire about the number of available physical pages in the system.
config for The ulimit Function: The ulimit function can be used to get and set certain process limits. #include <ulimit.h> long ulimit (int cmd, /* long newlimit */...); Returns: the value of the requested limit if OK, -1 on error The ulimit function allows a process to get or set some of its limits. The operation performed is determined by the value of the cmd argument, which must be one of the following four values: UL_GMEMLIM This returns the maximum amount of memory the process may use. On successful completion, the requested limit is returned. Otherwise, -1 is returned and the limit is not changed.
duma.sh
scriptThere is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
Checking if unsigned expression 'userSize' is less than zero.
'src' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined.
… and depreciate TODO
Visual Studio/C++ has a bunch of C runtime libraries (options /MT, /MTd, ..).
Thus, the duma library should be built against all of these variants .. with cmake.
JavaScript's eval()
function is potentially dangerous and is often misused. Using eval()
on untrusted code can open a program up to several different injection attacks. The use of eval()
in most contexts can be substituted for a better, alternative approach to a problem. Example - The not-preferred way : ```js …
There are 4 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/duma/issue/JS-0060/occurrences/
Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers. Example - The not-preferred way : ```js // It checks variables you have defined as …
There are 5 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/duma/issue/JS-0128/occurrences/
Fossil mirror / host on Chisel
Reorganize source tree, simplify directory structure
Build system items imported from TODO:
Enhancement: Better out of box support for cross-compilation. (Autotools still the gold standard here but also try to support with CMake).
enhance detection of DUMA_MIN_ALIGNMENT
in createconf use defines specifying the target architecture use compiler attributes which specify the necessary alignment
(Possibly) add autoconf/automake build process (useful for cross-build)
(Possibly)libtool to build shared libraries in Makefile depends on autoconf/automake
(Possibly) use configure to detect if f.e. pthread.h is installed and in search path check if pthread available before using it in Makefile depends on autoconf/automake
Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers. Example - The not-preferred way : ```js // It checks variables you have defined as …
There are 5 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/duma/issue/JS-0128/occurrences/
When DUMA starts, have an option to print the configuration (DUMA_* configuration variables).
useful for CI/CD logging; etc.
It is considered good practice to use the type-safe equality operators ===
and !==
instead of their regular counterparts ==
and !=
. For instance, the following statements are all considered true: js [] == false [] == ![] 3 == "03"
If one of those occurs in an innocent-looking …
There are 32 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/duma/issue/JS-0050/occurrences/
[ @suamor - Issue https://github.com/hayguen/duma_sf/issues/1 replicated. ]
Use cmake instead of simple make for project management.
Advantages:
Disadvantages (apart from porting work)
char **environ variable instead getenv()
relevant?
implement a list structure over pages rather than an array for all slots. this would save copying all slot entries, when list grows
store __func__
additionally to __FILE__
and __LINE__
depends on storing full filename (not just pointer) in slot
Ensure INSTALL details are accurate and reflect reality.
https://github.com/johnsonjh/duma/blob/master/SECURITY.md
i don't understand this file at all.
In conditional statements, it is very easy to mistype a comparison operator (such as ==
or ===
) as an assignment operator (such as =
). For example : ```js // example code snippet to check if the // value of number is even or not if(number % 2 = 0) { …
There are 0 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/duma/issue/JS-0001/occurrences/
http://tutorial.gsse.at/uploads/media/duma_iue.tgz
Checking if unsigned expression 'size' is less than zero.
(From TODO)
add feature to enable floating point exceptions by default C programs work with quiet NANs or similar values after an error this feature shall allow detecting of floating point division by zero, overflow, ..
test duma on several other freely available/downloadable compilers:
find solution for errors, when duma used in combination with STL (and MFC) under MS Visual C++ on Windows
make new variants behave fully C++ conform at least new_handler() gets called now
Decide on protecting upper or lower end with a reproducible random number generator (RNG) at runtime.
That will require additional control variables like DUMA_RANDOM_SEED
.. and probably also a DUMA_PROTECT_BELOW_PROBABILITY
with a value in 0 to 100. A good idea for a shorter but meaningful name would be nice!
Windows-related items:
DUMA_NO_GLOBAL_MALLOC_FREE
, it would be really nice if there were a DUMA_NO_GLOBAL_NEW_DELETE
option, which would disable the DUMA implementations of new
, new[]
, delete
, and delete[]
from being included into the library.current README.md does IMHO not give a good brief description of duma itself and for what it's good for.
something like http://duma.sourceforge.net/ is something, i would have in mind.
i'd suggest to insert that page - especially with the bullet points - at the begin of README.md.
above page contains the pdf document http://duma.sourceforge.net/74_75_76_77_78_Debugging_DE.pdf
it's german .. but, i'd think it's a good idea to add this document somehow into this github repo - probably not into the sources .. but unsure how/where. github does also offer sort of homepage - but never tried this.
in addition, that more than outdated sourceforge page does not reference this github repo.
i could check/try, if i can change this.
IMHO there's a too much history - not just in the history section - in the current README.md. This most of that could be outsourced into some separate document, e.g. history.md.
detailed description of the many environment variables is in the README.txt , which mostly was identical to the man page. think, this could be also converted into a .md and referenced from the primary README.md
some linux distribution like debian/ubuntu (https://packages.ubuntu.com/search?suite=default§ion=all&arch=any&lang=en&keywords=duma&searchon=names) come with their own packages of duma. might be worth mentioning - if not already. but not sure what code base the maintainers use. but i know, that they used to apply a bunch of patches!
this repo does also come with the subfolder https://github.com/johnsonjh/duma/tree/master/comparisons
the https://github.com/johnsonjh/duma/blob/master/comparisons/README.txt does refers to a dead page.
following link to the wayback machine could be used:
https://web.archive.org/web/20090204104251/http://www.cs.utexas.edu/users/jpmartin/memCheckers.html
anyway, the comparison is more than outdated.
the progress on linux and gcc in the last decade(s) IMHO makes it necessary to give a simple comparison of duma against at least
(non ./debian) modifications needed
Awaiting additional clarification and will update
Checking if unsigned expression 'newSize' is less than zero.
[ @suamor - Issue hayguen/duma/issues/2 replicated. ]
Duma does not build for gcc-6 and newer.
clang version 6 works (did not test later clang, but they may fail as well).
See for some https://github.com/johnsonjh/pmince for guidance
would think, we don't change the examples that often.
but, in fact, i have one more example in mind (better: demonstration), to compare performance with sort of number crunching.
just curious about what time factors we would get compared to gcc address sanitizer, but also valgrind.
Originally posted by @hayguen in #80 (comment)
In progress - created issue so I can't possibly forget.
Possible null pointer dereference: pcAddr++
and then force push
Create PowerShell version of make_git_source_version.sh
for native Windows builds from git checkout.
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.