unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: put shim at end of LD_PRELOAD path
@ 2021-03-13 12:43 David Bremner
  2021-04-16 12:12 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2021-03-13 12:43 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] test: put shim at end of LD_PRELOAD path
  2021-03-13 12:43 [PATCH] test: put shim at end of LD_PRELOAD path David Bremner
@ 2021-04-16 12:12 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2021-04-16 12:12 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-16 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 12:43 [PATCH] test: put shim at end of LD_PRELOAD path David Bremner
2021-04-16 12:12 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).