[PATCH] test: put shim at end of LD_PRELOAD path

classic Classic list List threaded Threaded
2 messages Options
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

[PATCH] test: put shim at end of LD_PRELOAD path

Certain tools like the address-sanitizer fail if they are not the
first LD_PRELOADed library. It does not seem to matter for our shims,
as long as they are loaded before libnotmuch.
---

Using the address sanitizer with notmuch is still a manual process,
but this allows one to manually LD_PRELOAD libasan to make some more
tests pass.

 test/test-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 29baa0c1..89e218df 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1117,7 +1117,7 @@ notmuch_with_shim () {
     base_name="$1"
     shift
     shim_file="${base_name}.so"
-    LD_PRELOAD=./${shim_file}${LD_PRELOAD:+:$LD_PRELOAD} notmuch-shared "$@"
+    LD_PRELOAD=${LD_PRELOAD:+:$LD_PRELOAD}:./${shim_file} notmuch-shared "$@"
 }
 
 # Creates a script that counts how much time it is executed and calls
--
2.30.1
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] test: put shim at end of LD_PRELOAD path

David Bremner <[hidden email]> writes:

> Certain tools like the address-sanitizer fail if they are not the
> first LD_PRELOADed library. It does not seem to matter for our shims,
> as long as they are loaded before libnotmuch.

For what it's worth, I've applied this change to master.

d
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]