On Fri, Oct 10, 2014 at 01:09:00PM +0400, Maxim Ostapenko wrote:
> This works indeed. However, calling set_ld_library_path_env_vars in {asan,
> tsan, ubsan}_finish will lead to updating LD_LIBRARY_PATH_{32, 64},
> LD_RUN_PATH etc. with "$ld_library_path:$orig_ld_{library_path_32,
> library_path_64, run, etc}". Is this fine?
Isn't that the state in which asan_init has been called?
I mean, all of asan.exp, tsan.exp and ubsan.exp source gcc-dg.exp which does:
global orig_environment_saved
# This file may be sourced, so don't override environment settings
# that have been previously setup.
if { $orig_environment_saved == 0 } {
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
}
so by the time asan_init etc. is called, it should have been
in LD_LIBRARY_PATH* etc. already.
2014-10-10 Max Ostapenko <[email protected]>
* lib/asan-dg.exp (asan_link_flags): Save ld_library_path.
* lib/tsan-dg.exp (tsan_link_flags): Likewise.
* lib/ubsan-dg.exp (ubsan_link_flags): Likewise.
* lib/asan-dg.exp (asan_finish): Remove
* restore_ld_library_path_env_vars.
Restore ld_library_path with saved value. Restore LD_LIBRARY_PATH
related env variables by calling set_ld_library_path_env_vars.
* lib/tsan-dg.exp (tsan_finish): Likewise.
* lib/ubsan-dg.exp (ubsan_finish): Likewise.
I'd rather duplicate the descriptions than duplicate the filenames in
the same ChangeLog entry. So, please put all asan-dg.exp changes together
etc.
Ok with that change.
Jakub