From: "Nicholas Sallembian" <nsallembian@inprise.com>
To: beww@intac.com
Cc: axp-list@redhat.com
Subject: Re: Any C++ on Alpha gfurus out there?
Date: Fri, 13 Nov 1998 11:17:14 -0800 [thread overview]
Message-ID: <364C85B9.5DC8AD59@inprise.com> (raw)
In-Reply-To: XFMail.981113141058.beww@intac.com
Try this code :
const char * EV_UnixMenu::_getItemPath(AP_Menu_Id id) const
{
for (UT_uint32 k=0; (k < m_nrActualFactoryItems); k++)
{
_wd * wd = (_wd *)m_menuFactoryItems[k].callback_action;
if (wd)
if (wd->m_id==id)
return m_menuFactoryItems[k].path;
}
There might be a problem in the order the if expression is evaluated : if wd is
NULL and wd->m_id is evaluated first... Crash !
Nicolas
Brian E.W. Wood wrote:
> I'm trying to compile the most recent versions of AbiWord, a promising project
> to create a GPL wysiwyg word processor.
>
> As of recent versions is has stopped working on my Alpha. It apparently
> comtinues to run on Intel machines.
>
> I'm definitely not a C++ programmer, but I'd like to try and find out what has
> happened.
>
> The program segfaults on the following bit of code:
>
> const char * EV_UnixMenu::_getItemPath(AP_Menu_Id id) const
> {
> for (UT_uint32 k=0; (k < m_nrActualFactoryItems); k++)
> {
> _wd * wd = (_wd *)m_menuFactoryItems[k].callback_action;
> if (wd && (wd->m_id==id))
> return m_menuFactoryItems[k].path;
> }
>
> GDB says it segfaults at the if statement.
>
> UT_uint32 is defined in the header file:
>
> protected:
> UT_uint32 m_nrActualFactoryItems;
> UT_Vector m_vecMenuWidgets;
>
> I realize that this is woefully inadequate information with which to diagnose
> the problem but I'm hoping somebody might have an inspired guess as to what
> direction I should proceed in. is the uint32 perhaps a problem on the alpha?
>
> Thanks.
>
> ---
> Brian E.W. Wood beww@intac.com
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next prev parent reply other threads:[~1998-11-13 19:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-13 19:10 Any C++ on Alpha gfurus out there? Brian E.W. Wood
1998-11-13 19:17 ` Nicholas Sallembian [this message]
1998-11-13 19:25 ` B. James Phillippe
1998-11-13 21:48 ` Nicholas Sallembian
1998-11-14 1:06 ` Bob McElrath
1998-11-14 13:20 ` sterwill
1998-11-14 17:37 ` Brian E.W. Wood
1998-11-13 19:26 ` Anders Hammarquist
1998-11-13 19:37 ` Heinz Ulrich Stille
1998-11-16 3:50 ` Michael J. Donahue
1998-11-16 13:15 ` Stefan Schroepfer
1998-11-16 13:45 ` Paul Tomblin
1998-11-16 14:24 ` Stefan Schroepfer
1998-11-16 14:43 ` Leo
-- strict thread matches above, loose matches on Subject: below --
1998-11-16 14:49 Leo
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox