fix vis_heap_chunk test on CI? (#1086)

* fix vis_heap_chunk test on CI?

* add libc6-dev for tests/CI for vis_heap_chunk test

* fix heap_vis.out build
pull/1087/head
Disconnect3d 3 years ago committed by GitHub
parent 902d732816
commit 546d6ffa19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,7 +20,10 @@ linux() {
install_apt() {
sudo apt-get update || true
sudo apt-get install -y nasm gcc
sudo apt-get install -y \
nasm \
gcc \
libc6-dev
test -f /usr/bin/go || sudo apt-get install -y golang
}

@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void break_here() {}
int main() {
@ -18,4 +20,11 @@ int main() {
free(allocs[1]);
break_here();
// We do not really need it for our test
// but we need it so that our CI test pass can get TLS variables
// See:
// - https://github.com/pwndbg/pwndbg/pull/1086
// - https://sourceware.org/bugzilla/show_bug.cgi?id=24548
pthread_create(0,0,0,0);
}

@ -81,8 +81,11 @@ heap_bins: heap_bins.c
-Wl,--dynamic-linker=${GLIBC_2_33}/ld-linux-x86-64.so.2 \
-g -O0 -o heap_bins.out heap_bins.c
heap_vis: heap_vis.c
${CC} -g -O0 -o heap_vis.out heap_vis.c
# Note: we use -pthread -lpthread because we hit this bug on CI builds:
# https://sourceware.org/bugzilla/show_bug.cgi?id=24548
heap_vis.out: heap_vis.c
@echo "[+] Building heap_vis.out"
${CC} -g -O0 -o heap_vis.out heap_vis.c -pthread -lpthread
clean :
@echo "[+] Cleaning stuff"

Loading…
Cancel
Save