diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-01-07 13:21:57 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-01-07 13:21:57 +0100 |
commit | acbaad31e8ea10fce8b9c0aef58afb388bf7489d (patch) | |
tree | eb8a5902a2080aa094a823ef02a64f78c2da4d71 /inet/rexec.c | |
parent | d5b0046e3ddf8ea82a3eff74068b8fd2665b98db (diff) | |
download | glibc-acbaad31e8ea10fce8b9c0aef58afb388bf7489d.tar.gz glibc-acbaad31e8ea10fce8b9c0aef58afb388bf7489d.tar.xz glibc-acbaad31e8ea10fce8b9c0aef58afb388bf7489d.zip |
elf: Fix fences in _dl_find_object_update (bug 28745)
As explained in Hans Boehm, Can Seqlocks Get Along with Programming Language Memory Models?, an acquire fence is needed in _dlfo_read_success. The lack of a fence resulted in an observable bug on powerpc64le compile-time load reordering. The fence in _dlfo_mappings_begin_update has been reordered, turning the fence/store sequence into a release MO store equivalent. Relaxed MO loads are used on the reader side, and relaxed MO stores on the writer side for the shared data, to avoid formal data races. This is just to be conservative; it should not actually be necessary given how the data is used. This commit also fixes the test run time. The intent was to run it for 3 seconds, but 0.3 seconds was enough to uncover the bug very occasionally (while 3 seconds did not reliably show the bug on every test run). Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Diffstat (limited to 'inet/rexec.c')
0 files changed, 0 insertions, 0 deletions