Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf_conformance/arm64 should run with address sanitizer enabled #155

Open
Alan-Jowett opened this issue Oct 13, 2022 · 3 comments
Open

bpf_conformance/arm64 should run with address sanitizer enabled #155

Alan-Jowett opened this issue Oct 13, 2022 · 3 comments

Comments

@Alan-Jowett
Copy link
Collaborator

Address sanitizer is failing when run under qemu for arm64 emulation.

Until this is resolved, ubsan is disabled for arm64.

==4232==LeakSanitizer has encountered a fatal error.
==4232==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1

@matt-gretton-dann
Copy link
Collaborator

Running these tests with the sanitizers on native Arm64 platforms (macOS 12 & Ubuntu 20.04) does not seem to trigger the same issues. So I wonder if its a QEmu problem - I will investigate further as I get time.

An alternative solution would be to self-host an Arm64 runner which can be used by the actions to run tests. I'll investigate to see if I can get one setup - but this may take some time. If anyone else can get one setup that would also be fine from my PoV.

@matt-gretton-dann
Copy link
Collaborator

Have now reproduced this myself:

matgre01@matgre01-linux-vm:~/ubpf$ LSAN_OPTIONS=verbosity=1:log_threads=1 ./build/bin/bpf_conformance_runner --test_file_directory tests --plugin_path aarch64_test/run-jit.sh --plugin_options --interpret
==19768==AddressSanitizer: libc interceptors initialized
|| `[0x002000000000, 0x007fffffffff]` || HighMem    ||
|| `[0x001400000000, 0x001fffffffff]` || HighShadow ||
|| `[0x001200000000, 0x0013ffffffff]` || ShadowGap  ||
|| `[0x001000000000, 0x0011ffffffff]` || LowShadow  ||
|| `[0x000000000000, 0x000fffffffff]` || LowMem     ||
MemToShadow(shadow): 0x001200000000 0x00123fffffff 0x001280000000 0x0013ffffffff
redzone=16
max_redzone=2048
quarantine_size_mb=256M
thread_local_quarantine_size_kb=1024K
malloc_context_size=30
SHADOW_SCALE: 3
SHADOW_GRANULARITY: 8
SHADOW_OFFSET: 0x1000000000

This suggests that this is indeed a Sanitizers don't work under QEmu problem.

It looks like having an Arm64 runner is the way forward.

@Alan-Jowett
Copy link
Collaborator Author

Blocked on availability of an ARM64 self-hosted runner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants