-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test time analyses csmith #243
base: main
Are you sure you want to change the base?
Conversation
# produces programs that we can't handle | ||
# cmd = ["csmith", "--seed", str(seed), "--max-block-size", str(max_blocksize), "--max-funcs", str(max_funcs), "--output", f"{fname}.c"] | ||
|
||
csmith_safe = "--no-arrays --no-bitfields --no-checksum --no-comma-operators --no-longlong --no-int8 --no-uint8 --no-float --no-math64 --no-inline-function --no-safe-math --no-packed-struct --no-pointers --no-structs --no-unions --no-volatile-pointers --no-const-pointers".split(" ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, what can't we handle about each of these things that have been disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just an incompleteness in steensgaard wrt MemoryLoads, this list is being overly conservative I'm not sure precisely what its disabling that makes it not generate that case, I'll dig up the example again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please share whatever case broke the Steensgaard, and maybe file an issue for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples/csmith/Makefile
Outdated
OUTS=$(addsuffix .out,$(SOURCENAMES)) | ||
CHECKSUMS=$(addsuffix .checksum,$(SOURCENAMES)) | ||
|
||
CSMITH_HEADER = "/nix/store/6rawnpny818v7wki6zlr3i0f3phmysyb-csmith-2.3.0/include/csmith-2.3.0/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is hardcoding this a good idea/going to be useful to anyone else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, It should be at least the normal install location /usr/include/csmith
c9e2f4e
to
a890ebb
Compare
d2356dd
to
0ea390c
Compare
This profiles the default static analysis pipeline against a set of random C programs generated by csmith.
It outputs the results in CSV and gnuplot format to produce plots like:
usage:
The generation script and tests all run singlethreaded so this takes quite a while to run unfortunately. Tests could possibly be multithreaded via
Future.sequence
but I don't know of a good way to avoid the JVM running out of memory by loading everything at once.