Skip to content

Commit fd7c5f2

Browse files
committed
SystemSan: repair pytorch-lightning-1.5.10
1 parent 9b3abc6 commit fd7c5f2

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

infra/experimental/SystemSan/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ test: all vuln.dict
3030
$(call test_fuzzer,target_file,Arbitrary file open)
3131

3232
pytorch-lightning-1.5.10:
33-
cp SystemSan.cpp PoEs/pytorch-lightning-1.5.10/; \
33+
cp SystemSan.cpp inspect_*.* PoEs/pytorch-lightning-1.5.10/; \
3434
cd PoEs/pytorch-lightning-1.5.10/; \
35-
docker build . --tag syssan_pytorch-lightning; \
36-
docker run -t systemsan_pytorch-lightning:latest;
35+
docker build . --tag systemsan_pytorch-lightning; \
36+
docker run -it systemsan_pytorch-lightning:latest;
3737

3838
node-shell-quote-v1.7.3:
3939
cp SystemSan.cpp PoEs/node-shell-quote-v1.7.3/; \

infra/experimental/SystemSan/PoEs/pytorch-lightning-1.5.10/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN apt update && \
2121
git clone \
2222
--depth 1 \
2323
--branch 1.5.10 \
24-
https://github.com/PyTorchLightning/pytorch-lightning.git
24+
https://github.com/Lightning-AI/lightning.git
2525

2626
COPY ./build.sh $SRC
2727
RUN ./build.sh

infra/experimental/SystemSan/PoEs/pytorch-lightning-1.5.10/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CXX = clang++
33
CFLAGS = -std=c++17 -Wall -Wextra -O3 -g3
44

5-
SystemSan: SystemSan.cpp
5+
SystemSan: SystemSan.cpp inspect_dns.cpp inspect_utils.cpp
66
$(CXX) $(CFLAGS) -lpthread -o $@ $^
77

88
run: clean SystemSan fuzz_pytorch_lightning.py

infra/experimental/SystemSan/PoEs/pytorch-lightning-1.5.10/build.sh

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,45 @@
1616
################################################################################
1717

1818
# Build and install project (using current CFLAGS, CXXFLAGS).
19-
cd pytorch-lightning
19+
cd lightning
20+
git apply <<EOF
21+
diff --git a/requirements.txt b/requirements.txt
22+
index dd34e9273..36f55e683 100644
23+
--- a/requirements.txt
24+
+++ b/requirements.txt
25+
@@ -1,7 +1,7 @@
26+
# the default package dependencies
27+
28+
numpy>=1.17.2
29+
-torch>=1.7.*
30+
+torch>=1.7.1
31+
future>=0.17.1 # required for builtins in setup.py
32+
tqdm>=4.41.0
33+
PyYAML>=5.1
34+
diff --git a/requirements/examples.txt b/requirements/examples.txt
35+
index 8591f9bd5..8c0d96bd1 100644
36+
--- a/requirements/examples.txt
37+
+++ b/requirements/examples.txt
38+
@@ -1,3 +1,3 @@
39+
-torchvision>=0.8.*
40+
+torchvision>=0.8.2
41+
gym>=0.17.0
42+
ipython[all]
43+
diff --git a/requirements/extra.txt b/requirements/extra.txt
44+
index 74743185e..52580b475 100644
45+
--- a/requirements/extra.txt
46+
+++ b/requirements/extra.txt
47+
@@ -2,7 +2,7 @@
48+
49+
matplotlib>3.1
50+
horovod>=0.21.2 # no need to install with [pytorch] as pytorch is already installed
51+
-torchtext>=0.8.*
52+
+torchtext>=0.8.1
53+
omegaconf>=2.0.5
54+
hydra-core>=1.0.5
55+
jsonargparse[signatures]>=4.0.4,<5.0.0
56+
EOF
57+
pip3 install --upgrade pip
2058
pip3 install .
2159

2260
# Build fuzzers in $OUT.

0 commit comments

Comments
 (0)