public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* PGP 5.0i compiled with egcs-1.0.2/Solaris 2.6-sparc gives bus error
@ 1998-03-24  0:03 Yusuf Goolamabbas
  1998-03-27 15:18 ` Todd Vierling
  0 siblings, 1 reply; 3+ messages in thread
From: Yusuf Goolamabbas @ 1998-03-24  0:03 UTC (permalink / raw)
  To: egcs

When generating a key via pgpk -g. I get a bus error.

According to the PGP bugs page

http://www.pgpi.com/bugs/bugs50i.shtml

Bus error on Solaris 2.5.1
Kris Van Hees <aedil@ny.fnx.com> wrote:

Hi,
    Compiling PGP 5.0i sources on a Solaris 2.5.1 (Sparc20) box with
GCC 2.7.1 succeeded but the resulting code aborts with a Bus Error when
running key generation (pgpk -g).  I traced down the problem to the struct
MD5Context, which contains a conditional for HAVE64, which is set along
with typedefs in include/pgpUsuals.h.  I am not certain why, but using
that auto-resolving finds a 64bit type as 'unsigned long long', and thus
sets HAVE64.  Yet when used in code this fails.  I think this might be
a problem with GCC/Solaris interaction.  A Bus Error sounds to me as a
possible alignment problem there.

        I manually disabled the HAVE64 check, so that the code will use
two 32bit words, and that solved the problem.

Can somebody comment upon this ?

I am on a solaris-sparc-2.6 system with gcc
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)

Cheers, Yusuf
-- 
Kent Ridge Digital Labs (Formerly Institute of Systems Science)
Heng Mui Keng Terrace, Singapore 119597, Republic of Singapore
Tel: +65 874-3116, Fax: +65 774-4990,  Email: yusufg@krdl.org.sg

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

* Re: PGP 5.0i compiled with egcs-1.0.2/Solaris 2.6-sparc gives bus error
  1998-03-24  0:03 PGP 5.0i compiled with egcs-1.0.2/Solaris 2.6-sparc gives bus error Yusuf Goolamabbas
@ 1998-03-27 15:18 ` Todd Vierling
  0 siblings, 0 replies; 3+ messages in thread
From: Todd Vierling @ 1998-03-27 15:18 UTC (permalink / raw)
  To: Yusuf Goolamabbas; +Cc: egcs

On Tue, 24 Mar 1998, Yusuf Goolamabbas wrote:

: MD5Context, which contains a conditional for HAVE64, which is set along
: with typedefs in include/pgpUsuals.h.  I am not certain why, but using

:         I manually disabled the HAVE64 check, so that the code will use
: two 32bit words, and that solved the problem.
: 
: Can somebody comment upon this ?

On Sun SPARCstations, 8-byte integers (`unsigned long long') ust be aligned
on an 8-byte boundary, and it is not used as such in this code.

Adding an "unsigned long pad" before the affected variable should fix it.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)


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

* Re: PGP 5.0i compiled with egcs-1.0.2/Solaris 2.6-sparc gives bus error
@ 1998-03-26 23:46 Geoffrey KEATING
  0 siblings, 0 replies; 3+ messages in thread
From: Geoffrey KEATING @ 1998-03-26 23:46 UTC (permalink / raw)
  To: egcs; +Cc: Yusuf Goolamabbas

> http://www.pgpi.com/bugs/bugs50i.shtml

> Bus error on Solaris 2.5.1

This is caused by a bug in pgp; they use a custom malloc, but don't
align the memory to an 8-byte boundary.  I sent in a patch.

--
Geoff Keating <Geoff.Keating@anu.edu.au>

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

end of thread, other threads:[~1998-03-27 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-24  0:03 PGP 5.0i compiled with egcs-1.0.2/Solaris 2.6-sparc gives bus error Yusuf Goolamabbas
1998-03-27 15:18 ` Todd Vierling
1998-03-26 23:46 Geoffrey KEATING

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).