-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ASan support * Add ASan support
- Loading branch information
Showing
8 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM varnish:7.6.1 | ||
|
||
USER root | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes \ | ||
build-essential \ | ||
libtool \ | ||
automake \ | ||
python3-docutils \ | ||
autoconf-archive \ | ||
libasan8 | ||
|
||
WORKDIR / | ||
|
||
COPY . /libvmod-querymodifier | ||
RUN cd /libvmod-querymodifier \ | ||
&& ./bootstrap --enable-asan \ | ||
&& make \ | ||
&& make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
server { | ||
location / { | ||
return 200 'OK'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
vcl 4.1; | ||
|
||
import querymodifier; | ||
import std; | ||
|
||
backend default { | ||
.host = "nginx"; | ||
.port = "80"; | ||
} | ||
|
||
sub vcl_recv { | ||
std.syslog(180, "RECV: " + req.http.host + req.url); | ||
set req.url = querymodifier.modifyparams(req.url, "ts,v,cacheFix,date", true); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
services: | ||
varnish: | ||
build: | ||
context: ../ | ||
dockerfile: ./debug/Dockerfile | ||
command: /entrypoint.sh | ||
ports: | ||
- 8080:80 | ||
environment: | ||
- VARNISH_SIZE=200M | ||
volumes: | ||
- ./default.vcl:/etc/varnish/default.vcl | ||
- ./entrypoint.sh:/entrypoint.sh | ||
nginx: | ||
image: nginx:1.27-alpine | ||
ports: | ||
- 8081:80 | ||
volumes: | ||
- ./default.conf:/etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libasan.so.8 | ||
export ASAN_OPTIONS=halt_on_error=0:detect_leaks=1 | ||
|
||
varnishd \ | ||
-F \ | ||
-f /etc/varnish/default.vcl \ | ||
-a http=:"${VARNISH_HTTP_PORT:-80}",HTTP \ | ||
-a proxy=:"${VARNISH_PROXY_PORT:-8443}",PROXY \ | ||
-p feature=+http2 \ | ||
-s malloc,"$VARNISH_SIZE" |