{"id":40003094,"url":"https://github.com/brakmic/filc-dev-env","last_synced_at":"2026-01-19T02:02:40.349Z","repository":{"id":322129523,"uuid":"1088303093","full_name":"brakmic/filc-dev-env","owner":"brakmic","description":"Fil-C Development Environment","archived":false,"fork":false,"pushed_at":"2025-11-02T18:43:05.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-02T19:19:44.559Z","etag":null,"topics":["clang","cpp","filc"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brakmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-02T17:54:39.000Z","updated_at":"2025-11-02T18:43:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/brakmic/filc-dev-env","commit_stats":null,"previous_names":["brakmic/filc-dev-env"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/brakmic/filc-dev-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Ffilc-dev-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Ffilc-dev-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Ffilc-dev-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Ffilc-dev-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brakmic","download_url":"https://codeload.github.com/brakmic/filc-dev-env/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Ffilc-dev-env/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28557784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clang","cpp","filc"],"created_at":"2026-01-19T02:02:27.718Z","updated_at":"2026-01-19T02:02:40.341Z","avatar_url":"https://github.com/brakmic.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fil-C Development Environment\n\nA ready-to-use development environment for [Fil-C](https://fil-c.org/), a memory-safe C/C++ implementation that catches all memory safety errors at runtime.\n\n## What This Repo Provides\n\n- **Pre-configured shell environment** with convenience aliases and functions\n- **Organized directory structure** for clean source/build separation  \n- **Test programs** demonstrating various memory safety violations\n- **Documentation** for setup and workflows\n- **Professional build tooling** for Fil-C development\n\n## Quick Start\n\n### Prerequisites\n\n- **OS**: Linux x86_64 (tested on WSL2 Ubuntu 24.04)\n- **Shell**: Bash\n- **Sudo access** for installing Fil-C to `/opt/fil`\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/brakmic/filc-dev-env.git\ncd filc-dev-env\n\n# Run the automated setup script\n./setup.sh\n```\n\nThe `setup.sh` script will:\n1. Install required system dependencies (curl, build-essential, gdb, etc.)\n2. Create the directory structure (`build/`, `src/filc/`, `doc/`)\n3. Install Fil-C workflow aliases to `~/.bash_aliases`\n4. Download and install Fil-C 0.673 to `/opt/fil`\n5. Configure PATH and dynamic loader\n6. Copy all test programs and documentation\n\nAfter setup completes:\n```bash\nsource ~/.bashrc\nfilcc --version\nfilcc-run src/filc/hello.c\n```\n\n### Manual Installation\n\nIf you prefer to install manually, follow the detailed guide in [`doc/fil-c.md`](doc/fil-c.md):\n\n```bash\n# Install dependencies\nsudo apt update \u0026\u0026 sudo apt install -y \\\n  curl ca-certificates wget xz-utils \\\n  build-essential binutils file \\\n  git pkg-config gdb strace\n\n# Download and install Fil-C 0.673\nmkdir -p downloads/optfil-work\ncd downloads\ncurl -L -O https://github.com/pizlonator/fil-c/releases/download/v0.673/optfil-0.673-linux-x86_64.tar.xz\ntar -C optfil-work -xf optfil-0.673-linux-x86_64.tar.xz\ncd optfil-work/optfil-0.673-linux-x86_64\nsudo ./setup.sh\n\n# Configure PATH and loader\ngrep -q '/opt/fil/bin' ~/.bashrc || echo 'export PATH=/opt/fil/bin:$PATH' \u003e\u003e ~/.bashrc\nsource ~/.bashrc\necho '/opt/fil/lib' | sudo tee /etc/ld.so.conf.d/filc.conf\nsudo ldconfig\n```\n\n### Verifying Installation\n\n```bash\n# Verify Fil-C is installed\nfilcc --version\n# Expected: Fil-C 0.673 clang version 20.x.x\n\n# Quick test - should trigger a memory safety panic\nfilcc-run src/filc/uaf.c\n# Expected: \"filc safety error\" and exit code 133\n\n# Test all demo programs\nfilc-test-all\n```\n\n## What Gets Installed\n\nThe setup script installs:\n- **Fil-C 0.673** to `/opt/fil` (compiler, runtime libraries, loader)\n- **Workflow functions** in `~/.bash_aliases` (filcc-run, filcc-build, etc.)\n- **Test programs** demonstrating memory safety bugs\n- **Documentation** for development workflows\n\nDownload size: ~150MB  \nInstalled size: ~500MB in `/opt/fil`\n\n## Directory Structure\n\n```\nfilc-dev-env/\n├── .bash_aliases       # Fil-C workflow functions and aliases\n├── src/\n│   └── filc/          # Test programs demonstrating memory safety bugs\n│       ├── hello.c\n│       ├── uaf.c              # Use-after-free\n│       ├── oob.c              # Stack buffer overflow\n│       ├── heap_oob.c         # Small heap overflow\n        ├── heap_oob_big.c     # Large heap overflow\n        ├── heap_oob_neg.c     # Negative offset OOB\n        ├── write_bad.c        # Invalid syscall buffer\n        └── cpp_oob.cpp        # C++ with safety violation\n├── build/             # Compiled binaries (auto-created, not in git)\n├── doc/\n│   └── fil-c.md       # Detailed Fil-C installation guide\n├── setup.sh           # Automated setup script\n├── WORKFLOW.md        # Development workflow reference\n└── README.md          # This file\n```\n\n## Available Commands\n\n### Compile \u0026 Run (one step)\n```bash\nfilcc-run src/filc/uaf.c          # Compile + run C program\nfilcpp-run src/filc/cpp_oob.cpp   # Compile + run C++ program\n```\n\n### Build Only\n```bash\nfilcc-build src/filc/test.c       # Output: ~/build/test\nfilcpp-build src/filc/test.cpp    # Output: ~/build/test\n```\n\n### Execute Pre-Built Programs\n```bash\nfilc-exec uaf                     # Run ~/build/uaf\nfilc-list                         # Show all built programs\n```\n\n### Project Management\n```bash\nfilc-clean                        # Delete all binaries in ~/build\nfilc-verify uaf                   # Verify binary uses Fil-C\nfilc-test-all                     # Test all programs in src/filc\n```\n\nSee [`WORKFLOW.md`](WORKFLOW.md) for detailed usage examples.\n\n## What Fil-C Catches\n\nAll test programs in `src/filc/` demonstrate real memory safety bugs that Fil-C catches at runtime:\n\n- ✅ **Out-of-bounds access** (heap and stack)\n- ✅ **Use-after-free**\n- ✅ **Type confusion** between pointers and non-pointers\n- ✅ **Invalid system call buffers**\n- ✅ **Pointer races**\n- ✅ **And more...**\n\nExpected behavior: All test programs should panic with \"filc safety error\" and exit code 133.\n\n## Key Features of This Environment\n\n### Clean Build Separation\n- Sources in `src/filc/`\n- Binaries in `build/` (automatically managed)\n- Home directory stays clean\n\n### Demo-Safe Compilation\nAll functions automatically use flags that prevent compiler optimizations from hiding bugs:\n- `-O0` - No optimization\n- `-fno-builtin` - No builtin function optimizations  \n- `-fno-inline` - No function inlining\n\n### Professional Workflow\n- Batch testing with `filc-test-all`\n- Easy verification with `filc-verify`\n- Consistent build output management\n- Clear progress messages\n\n## Requirements\n\n- **OS**: Linux x86_64 (tested on WSL2 Ubuntu 24.04)\n- **Fil-C**: Version 0.673 or later\n- **Shell**: Bash (functions defined in `.bash_aliases`)\n\n## Documentation\n\n- [`doc/fil-c.md`](doc/fil-c.md) - Complete Fil-C installation guide\n- [`WORKFLOW.md`](WORKFLOW.md) - Detailed workflow examples\n- [Fil-C Official Website](https://fil-c.org/)\n- [Fil-C GitHub](https://github.com/pizlonator/fil-c)\n\n## Customization\n\n### Adding Your Own Test Programs\n\n```bash\n# Create a new test\nvim src/filc/my_test.c\n\n# Compile and run\nfilcc-run src/filc/my_test.c\n\n# Or just build it\nfilcc-build src/filc/my_test.c\n```\n\n### Modifying Aliases\n\nEdit `~/.bash_aliases` and reload:\n```bash\nvim ~/.bash_aliases\nsource ~/.bash_aliases\n```\n\n## Contributing\n\nThis is a personal development environment setup, but feel free to:\n- Fork and adapt to your needs\n- Submit issues for bugs or improvements\n- Share your own Fil-C test programs\n\n## License\n\nThe environment configuration and test programs are provided as-is for educational purposes.\n\nFil-C itself is licensed separately:\n- Compiler (LLVM/clang): LLVM License\n- Runtime: PAS License\n- See Fil-C distribution for full license details\n\n## Acknowledgments\n\n- [Fil-C Project](https://fil-c.org/) by Filip Pizlo\n- Based on clang 20.1.8 and LLVM infrastructure\n\n---\n\n**Note**: This repository contains configuration files and test programs only. You need to install Fil-C separately following the instructions in [`doc/fil-c.md`](doc/fil-c.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Ffilc-dev-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrakmic%2Ffilc-dev-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Ffilc-dev-env/lists"}