<img src="under_construction.gif" width="640px"/>
<marquee>Welcome to my GeoCities!</marquee>
flowchart LR
w("โ") --> eb("๐ฅ")
eb --> wc("๐ป")
wc --> eb2("๐ฅ๐ฅ")
eb2 --> s("๐ด")
s --> w
Analyze how a C program uses memory regions
License: Other
If we have something like:
typedef struct _A __CENTRINEL_MANAGED_ATTR A;
void foo (A* a);
We should get a warning about the use of A*
in the type of foo
since struct _A
has been explicitly tagged with a region attribute.
In --project
mode if the same translation unit appears multiple times in the compilation database, only run the analysis once and just record that the other occurrences in compile_commands were skipped.
This is a good way to keep the JSON output smaller for #8
If typeof(e)
is a managed ptr and typeof (e->f)
is too, then e->f = o
should elicit a warning.
(In Mono, the correct expression would be mono_gc_wbarrier_generic_store (&e->f, o)
)
This is a refinement of #11 - we should cache centrinel warnings based on the content of the warning - so for example if the same declaration comes into scope in different translation units (or the same translation unit but different CFLAGS in compile_commands.json
) we should report it only the first time.
Once #2 is done, write an HTML template that consumes the json report
We want to warn if public API functions (marked with an attribute):
Or maybe json since we already depend on aeson.
centrinel --project compile_commands.json --output-format=json --output=data.json
Right now we only look for a suppress attribute on the first statement of a compound block:
{
_dummy_label: __attribute__(suppress(1)); /* see https://github.com/visq/language-c/issues/32 for why we need a label here */
.. code...
}
But it would be helpful to also to switch back and forth inside a block:
{
..code...
suppress(1); /* switch suppression off until next suppress pragma in the same block */
... unchecked code ...
suppress(0); /* switch back to checking until end of scope */
... checked code ...
}
Functions that have parameters or locals from the distinguished region should contain a dynamic check macro somewhere near their entrypoint.
Particularly in --project
mode, but may also make sense for single invocations.
Right now we can suppress block scopes, but there's no way to suppress warnings about a declaration.
In particular it would be nice to combine with mono's annotation for deprecated APIs so that we don't get thousands of warnings about functions that we can't call anyway.
Don't just write to stdout, write to a log file
ideal:
centrinel --project compile_commands.json --output file.log
[nothing is printed to stdout]
See lambdageek/centrinel-report#1
It may make sense to produce a single JSON file per translation unit and update centrinel-report
to consume some version of the compile_commands.json
database.
(would also have to munge the commands db before processing to note multiple invokes on a single translation unit)
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.