Git Product home page Git Product logo

csapp-labs's Introduction

CSAPP labs

来源: http://csapp.cs.cmu.edu/3e/labs.html

❗️提醒:在每个实验之前仔细阅读官网的 write up

环境: 因为很多文件在 MacOS 上无法直接运行,所以程序在 docker 容器下运行。IDEA 的文档 https://www.jetbrains.com/help/idea/docker.html 可以帮助搭建环境。 在这里我用的镜像是 gcc

docker run --rm -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v ~/Project/personal-project/csapp/labs/bomb:/app -w /app gcc

运行参数是 gdb 调试需要。 具体见 https://github.com/tonyOreglia/argument-counter/wiki/How-to-use-GDB-within-Docker-Container

进入容器之后,运行:

apt-get update
apt-get install gdb

注意 docker 是 64 位系统,Data Lab makefile 需要改为 64 才能直接运行。

寄存器使用惯例:https://en.wikipedia.org/wiki/X86_calling_conventions 我们对应的是 x86-84 GCC 可以看出参数寄存器: RDI, RSI, RDX, RCX, R8, R9, 由调用者保存 RAX 返回寄存器 RAX, R10, R11 调用者保存 RBX R12 R13 R14 RBP RSP 调用者保存

  1. Data Lab ✅
  2. Bomb Lab ✅
  3. Attack Lab ✅
  4. Buffer Lab legacy & replaced by attack lab
  5. Architecture Lab
  6. Architecture Lab (Y86) legacy & replaced by 5
  7. Cache Lab ✅ 第二个实验可能会超时,需要修改 test-trans.c 文件中 alarm 时间
  8. Performance Lab
  9. Shell Lab
  10. Malloc Lab
  11. Proxy Lab

csapp-labs's People

Contributors

fedeoo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.