Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Oct 2009 14:03:59 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Boris Samorodov <bsam@ipt.ru>
Cc:        bz@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: abort acroread at today's -current, but OK at 03-Oct -current
Message-ID:  <20091006110359.GH2259@deviant.kiev.zoral.com.ua>
In-Reply-To: <22767770@bb.ipt.ru>
References:  <78132948@bb.ipt.ru> <20091005190710.GW2259@deviant.kiev.zoral.com.ua> <22767770@bb.ipt.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--Nwn6wlxaqfRJxJFc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 06, 2009 at 12:49:09PM +0400, Boris Samorodov wrote:
> On Mon, 5 Oct 2009 22:07:10 +0300 Kostik Belousov wrote:
> > On Mon, Oct 05, 2009 at 10:46:51PM +0400, Boris Samorodov wrote:
> > >=20
> > > today I updated my computer from 03-Oct CURRENT to -current and
> > > some ports were updated. And have got an error:
> > > -----
> > > % acroread
> > > zsh: abort      acroread
> > > % /bin/sh -x `which acroread`
> > > + echo ''
> > > + tr a-z A-Z
> > > + ADOBE_LANG=3D''
> > > + : ENU
> > > + BN=3Dacroread
> > > + VN=3D''
> > > + [ -d /usr/local/Adobe/Reader8 ]
> > > + ADOBE_VER=3D8
> > > + [ -d /usr/local/Adobe/Reader9 ]
> > > + ACROBASE=3DAdobe/Reader8
> > > + BINPREFIX=3DAdobe/Reader8/bin
> > > + MOZILLA_COMP_PATH=3D/..//usr/local/lib/linux-nvu
> > > + export MOZILLA_COMP_PATH
> > > + GTK_IM_MODULE=3Dxim
> > > + export GTK_IM_MODULE
> > > + UNAME_s=3DLinux
> > > + export UNAME_s
> > > + [ -x /usr/local/Adobe/Reader8/ENU/Adobe/Reader8/bin/acroread ]
> > > + exec /compat/linux/bin/sh /usr/local/Adobe/Reader8/ENU/Adobe/Reader=
8/bin/acroread
> > > zsh: abort      /bin/sh -x `which acroread`
> > > -----
> > >=20
> > > Loading old kernel gives a working acroread. What did I miss?
> > > Thanks.
>=20
> > Try this.
>=20
> > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
> > index 4ed7382..e958214 100644
> > --- a/sys/kern/imgact_elf.c
> > +++ b/sys/kern/imgact_elf.c
> > @@ -635,7 +635,8 @@ __elfN(load_file)(struct proc *p, const char *file,=
 u_long *addr,
> >  	}
> > =20
> >  	for (i =3D 0, numsegs =3D 0; i < hdr->e_phnum; i++) {
> > -		if (phdr[i].p_type =3D=3D PT_LOAD) {	/* Loadable segment */
> > +		if (phdr[i].p_type =3D=3D PT_LOAD && phdr[i].p_memsz !=3D 0) {
> > +			/* Loadable segment */
> >  			prot =3D 0;
> >  			if (phdr[i].p_flags & PF_X)
> >    				prot |=3D VM_PROT_EXECUTE;
> > @@ -764,6 +768,8 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params=
 *imgp)
> >  	for (i =3D 0; i < hdr->e_phnum; i++) {
> >  		switch (phdr[i].p_type) {
> >  		case PT_LOAD:	/* Loadable segment */
> > +			if (phdr[i].p_memsz =3D=3D 0)
> > +				break;
> >  			prot =3D 0;
> >  			if (phdr[i].p_flags & PF_X)
> >    				prot |=3D VM_PROT_EXECUTE;
>=20
> Thanks. Unfortunately there is no changes. Acroread works only with
> security.bsd.map_at_zero=3D1.

I see, with the help from bz@. Do you have amd64 or i386 system ?
Anyway, please try http://people.freebsd.org/~kib/misc/pie.3.patch

--Nwn6wlxaqfRJxJFc
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkrLJB0ACgkQC3+MBN1Mb4gH+wCeINesfp8Ee4WEpfsL3qEeLsOB
NToAn2blq3kBdBlvqt7GcWMtXNXdPn00
=5nO9
-----END PGP SIGNATURE-----

--Nwn6wlxaqfRJxJFc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091006110359.GH2259>