Skip to content

Instantly share code, notes, and snippets.

View mirimmad's full-sized avatar
💭
zzz....

Mir Immad mirimmad

💭
zzz....
  • Kashmir.
View GitHub Profile
@mirimmad
mirimmad / gsoc-2022.md
Last active October 2, 2022 10:12
GSoC 2022: Extend GCCs static analyzer to support checking for POSIX file descriptor APIs

Google Summer of Code 2022

Overview

The project aims to extend GCC’s static analyzer to support reporting warnings for “misuse” of POSIX FD APIs such as double-close, leakage, access mode mismatch etc. by implementing the state machine that checks such misuse. Also, the project aims to add three attributes for use on functions that work with file descriptors

Progress made

The static analyzer can now recognize functions open, close, read, write, creat, dup, dup2 and dup3 and report their misuse accordingly.

The project added five new warnings to GCC relating to misuse of file descriptors

cat <<'EOF' |
Native configuration is x86_64-pc-linux-gnu
=== gcc tests ===
Running target unix
FAIL: gcc.dg/pr23911.c scan-tree-dump-times dce3 "__complex__ \\\\(1.0e\\\\+0, 0.0\\\\)" 2
FAIL: gcc.dg/pr56837.c scan-tree-dump-times optimized "memset ..c, 68, 16384.;" 1
XPASS: gcc.dg/guality/example.c -O0 execution test
cat <<'EOF' |
Native configuration is x86_64-pc-linux-gnu
=== gcc tests ===
Running target unix
FAIL: gcc.dg/pr23911.c scan-tree-dump-times dce3 "__complex__ \\\\(1.0e\\\\+0, 0.0\\\\)" 2
FAIL: gcc.dg/pr56837.c scan-tree-dump-times optimized "memset ..c, 68, 16384.;" 1
XPASS: gcc.dg/guality/example.c -O0 execution test
cat <<'EOF' |
Native configuration is x86_64-pc-linux-gnu
=== gcc tests ===
Running target unix
XPASS: gcc.dg/guality/example.c -O0 execution test
XPASS: gcc.dg/guality/example.c -O1 -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/example.c -Og -DPREVENT_OPTIMIZATION execution test
cat <<'EOF' |
Native configuration is x86_64-pc-linux-gnu
=== gcc tests ===
Running target unix
XPASS: gcc.dg/guality/example.c -O0 execution test
XPASS: gcc.dg/guality/example.c -O1 -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/example.c -Og -DPREVENT_OPTIMIZATION execution test
@mirimmad
mirimmad / resume.md
Last active September 9, 2022 17:18
Resume - Mir Immad

Mir Immad

Github : mirimmad

Projects

  • LiveCam - LiveCam is a video streamer written in Python using OpenCV and Flask
  • pending Interpreter - Work on an Interpreter for a simple Programming Language is going on

Future Projects

  • Operating System - A bootable OS using Assembly and C