Skip to content
Snippets Groups Projects
Commit cbfab212 authored by Nadav Har'El's avatar Nadav Har'El Committed by Avi Kivity
Browse files

tests: compile tst-mmap with "-z now"


Compile tst-mmap.so with "-z now", so that symbols are resolved at load
time instead of when needed.

The problem was that tst-mmap uses wait_until, which runs the functions
sched::thread::wait() and sched::thread::stop_wait() while preemption is
disabled. In about 1 in 10 runs of tst-mmap.so, this caused an assertion-
failure crash (symbol resolution caused sleeping while preemption is disabled).

Fixes #256.

Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
parent 9d30d585
No related branches found
No related tags found
No related merge requests found
...@@ -227,6 +227,7 @@ tests += tests/misc-mmap-anon-perf.so ...@@ -227,6 +227,7 @@ tests += tests/misc-mmap-anon-perf.so
tests += tests/tst-mmap-file.so tests += tests/tst-mmap-file.so
tests += tests/misc-mmap-big-file.so tests += tests/misc-mmap-big-file.so
tests += tests/tst-mmap.so tests += tests/tst-mmap.so
tests/tst-mmap.so: COMMON += -Wl,-z,now
tests += tests/tst-huge.so tests += tests/tst-huge.so
tests += tests/tst-elf-permissions.so tests += tests/tst-elf-permissions.so
tests/tst-elf-permissions.so: COMMON += -Wl,-z,relro tests/tst-elf-permissions.so: COMMON += -Wl,-z,relro
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment