Skip to content

Commit

Permalink
Add capstone-4.0.2 release source code
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbinit committed May 13, 2023
1 parent df9f471 commit 09ca482
Show file tree
Hide file tree
Showing 773 changed files with 1,178,663 additions and 0 deletions.
14 changes: 14 additions & 0 deletions capstone/.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 4.0-{build}

os:
- Visual Studio 2015

before_build:
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

build_script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=RELEASE -G "NMake Makefiles" ..
- nmake

17 changes: 17 additions & 0 deletions capstone/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{py,pyx,pxd}]
indent_style = space
indent_size = 4

# Follow Linux kernel coding style
[*.{c,h,cpp,hpp,inc}]
indent_style = tab
indent_size = 8

[Makefile]
indent_style = tab
1 change: 1 addition & 0 deletions capstone/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/arch/**/*.inc linguist-language=C
23 changes: 23 additions & 0 deletions capstone/.github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'capstone'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'capstone'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure()
with:
name: artifacts
path: ./out/artifacts
131 changes: 131 additions & 0 deletions capstone/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
.DS_Store

# Object files
*.o
*.ko

# Gcc dependency-tracking files
*.d

# Libraries
*.lib
*.a

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app

# python
bindings/python/build/
bindings/python/capstone.egg-info/
*.pyc

# java
bindings/java/capstone.jar

# ocaml
bindings/ocaml/*.cmi
bindings/ocaml/*.cmx
bindings/ocaml/*.cmxa
bindings/ocaml/*.mli
bindings/ocaml/test
bindings/ocaml/test_arm
bindings/ocaml/test_arm64
bindings/ocaml/test_basic
bindings/ocaml/test_mips
bindings/ocaml/test_x86
bindings/ocaml/test_detail
bindings/ocaml/test_ppc
bindings/ocaml/test_sparc
bindings/ocaml/test_systemz
bindings/ocaml/test_xcore
bindings/ocaml/test_m680x


# test binaries
tests/test_basic
tests/test_detail
tests/test_iter
tests/test_arm
tests/test_arm64
tests/test_mips
tests/test_x86
tests/test_ppc
tests/test_skipdata
tests/test_sparc
tests/test_systemz
tests/test_xcore
tests/*.static
tests/test_customized_mnem
tests/test_m68k
tests/test_tms320c64x
tests/test_m680x
tests/test_evm

# regress binaries
suite/regress/invalid_read_in_print_operand

# vim tmp file
*.swp
*~

capstone.pc

# local files
_*

# freebsd ports: generated file with "make makesum" command
packages/freebsd/ports/devel/capstone/distinfo

# VisualStudio
**/.vs/
ProjectUpgradeLog.log
Debug/
Release/
ipch/
build*/
*.sdf
*.opensdf
*.suo
*.user
*.backup
*.VC.db
*.VC.opendb

# CMake build directories
build*/

# Xcode
xcode/Capstone.xcodeproj/xcuserdata
xcode/Capstone.xcodeproj/project.xcworkspace/xcuserdata

# suite/
test_arm_regression
test_arm_regression.o
fuzz_harness
test_iter_benchmark
fuzz_bindisasm
fuzz_disasm
capstone_get_setup

suite/fuzz/fuzz_bindisasm2
suite/fuzz/fuzz_decode_platform
tests/test_bpf
tests/test_mos65xx
tests/test_riscv
tests/test_wasm


*.s

cstool/cstool

# android
android-ndk-*
68 changes: 68 additions & 0 deletions capstone/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
language: cpp
sudo: false
before_install:
- export LD_LIBRARY_PATH=`pwd`/tests/:$LD_LIBRARY_PATH
before_script:
- wget https://github.com/groundx/capstonefuzz/raw/master/corpus/corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip
- unzip -q corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip -d suite/fuzz
script:
- ./make.sh
- make check
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp libcapstone.so.* bindings/python/libcapstone.so; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp libcapstone.*.dylib bindings/python/libcapstone.dylib; fi
- if [[ "$NOPYTEST" != "true" ]]; then cd bindings/python && make check; fi
compiler:
- clang
- gcc
os:
- linux
- osx
matrix:
include:
- name: xenial gcc
os: linux
dist: xenial
compiler: gcc
addons:
apt:
packages:
- libcmocka-dev
- name: bionic gcc (ARM64)
arch: arm64
os: linux
dist: bionic
compiler: gcc
addons:
apt:
packages:
- libcmocka-dev
- unzip
- name: bionic gcc (System Z)
arch: s390x
os: linux
dist: bionic
compiler: gcc
addons:
apt:
packages:
- libcmocka-dev
- name: xenial clang
os: linux
dist: xenial
compiler: clang
addons:
apt:
packages:
- libcmocka-dev
- name: fuzza
env: ASAN_OPTIONS=detect_leaks=0 CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address" CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address" LDFLAGS="-fsanitize=address" NOPYTEST=true
compiler: clang
os: linux
- name: fuzzm
env: CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory" CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory" LDFLAGS="-fsanitize=memory" NOPYTEST=true
compiler: clang
os: linux
- name: fuzzu
env: CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined" CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined -fno-sanitize-recover=undefined,integer" LDFLAGS="-fsanitize=undefined" NOPYTEST=true
compiler: clang
os: linux
Loading

0 comments on commit 09ca482

Please sign in to comment.