Hello.
I look at strange issue with df test from coreutils testsuite.
The test is simple:
$ cat 1.c
#include <stdio.h>
#include <errno.h>
#ifdef __sun
#include <sys/mntent.h>
#else
#include <mntent.h>
#endif

struct mntent *getmntent (FILE *fp)
{
  errno = ENOENT;
  return NULL;
}

$ gcc -fPIC -shared 1.c -o 1.so
$ LD_PRELOAD 1.so /usr/gnu/bin/df

On Linux  df prints
df: cannot read table of mounted file systems: No such file or directory

But on OI I receive see strange core dump (in libc ?):
Program terminated with signal 11, Segmentation fault.
#0  0xfee76214 in strstr () from /lib/libc.so.1

So, it seems it code even doesn't reach df's main. How can it be? Is it runtime linker fault? I just don't remember seeing such backtrace...

--
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department


-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to