Skip to content

JonghoKim-Harry/misra-c-vulnerability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WHY MISRA C VULNERABILITY?

What is used?

  • MISRA C
  • MiBench Automotive - SUSAN
  • gemV

Directory Structure

   <project home>/
      README.md
      script/
         README
         ...
      config/
         Pathinfo.csv
         Baseline.csv
         Digest.csv
         config1.csv
         config2.csv
         ...
      src/
         susan_modified/
            README
            Makefile
            workload_info/
               Pathinfo.csv
               Group.csv
               workload1.csv
               workload2.csv
               ...
         patricia_modified/
            ...
         do_nothing/
            ...
         matmul/
            ...
         ...

SUSAN

K&R Style

SUSAN uses K&R style, which is old style of C.

K&R style looks like...

int main(argc, argv)
    int   argc;
    char  *argv [];
{
    ...
    return 0;
}

We STRONGLY recommand write like...

int main(int argc, char *argv[]) {
    ...
    return 0;
}

compile with:

$ gcc -O4 -o susan susan2l.c -lm
GCC Option Description
-o <file> Place the output into <file>
-l<library name> Link with a library file 'lib<library name>.a'
(ex) -lm links with 'libm.a'
-O4 Optimizing at level 4. But now, above level 3, to be level 3.

gemV

GitHub Repository

https://github.com/ktanikel/GemV-2.0

Options Needed

gemV Options
-c <your benchmark>
--cpu-type=arm_detailed

Articles

"Goto Statement Considered Harmful", Dijkstra, 1968

DIJKSTRA, Edsger W. Go to statement considered harmful. In: Software pioneers. Springer Berlin Heidelberg, 2002. p. 351-355.

About

Measure vulnerability of MISRA C code to soft error.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published