Subject: bug#29576: crasher in preopen.c

From: Arun Raghavan <[email-masked]>
Date: Tue, 05 Dec 2017 12:09:53 +0530

Hello,
I found the following bug in the preopen loader.

The precise point of the crash is:

  http://git.savannah.gnu.org/cgit/libtool.git/tree/libltdl/loaders/preopen.c#n282

Pasting the code here for reference:

   if (symlist[1].name && STREQ (symlist[1].name, "@INIT@"))

This is triggered when my program sets:

  const lt_dlsymlist lt_preloaded_symbols[] = { { 0, 0 } };

The cause is clearly the use of symlist[1] om that code. Presumably it
should be symlist[0]?

Cheers,
Arun