comp.lang.ada
 help / color / mirror / Atom feed
* Re: Segmentation fault on VADSself
  1999-08-30  0:00 Segmentation fault on VADSself FAVIER PIERRE
@ 1999-08-30  0:00 ` Robert Dewar
  1999-09-02  0:00 ` David Tannen
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Dewar @ 1999-08-30  0:00 UTC (permalink / raw)


In article <7qer2f$j2a$1@mars.worldonline.fr>,
  "FAVIER PIERRE" <pierre.favier@worldonline.fr> wrote:
> Any clue on how to solve this?

Does the vendor say the compiler should work with the later
OS version? If not, then no reason to think it will. If so,
then I would say let the vendor sort out the problem!
Generally you cannot assume version X of a compiler that works
on version Y of an OS will work on version Y+1 of the OS,
even if upwards compatibility is promised by the OS vendor.

Robert Dewar
Ada Core Technologies


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Segmentation fault on VADSself
@ 1999-08-30  0:00 FAVIER PIERRE
  1999-08-30  0:00 ` Robert Dewar
  1999-09-02  0:00 ` David Tannen
  0 siblings, 2 replies; 5+ messages in thread
From: FAVIER PIERRE @ 1999-08-30  0:00 UTC (permalink / raw)


We have a program compiled using rational VADSself 6.2.3d on HP-UX/9.07
which has always been working very well.

Now, when recompiling on HP-UX/10.20 (with the same version of the compiler)
we get random segmentation faults. Nevertheless, when running the program
under the debugger it runs fine.

Any clue on how to solve this?








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

* Re: Segmentation fault on VADSself
  1999-08-30  0:00 Segmentation fault on VADSself FAVIER PIERRE
  1999-08-30  0:00 ` Robert Dewar
@ 1999-09-02  0:00 ` David Tannen
  1999-09-03  0:00   ` Simon Wright
  1 sibling, 1 reply; 5+ messages in thread
From: David Tannen @ 1999-09-02  0:00 UTC (permalink / raw)


Hi,

>We have a program compiled using rational VADSself 6.2.3d on 
>HP-UX/9.07 which has always been working very well.

Hey this sounds familiar.
 
>Now, when recompiling on HP-UX/10.20 (with the same version 
>of the compiler) we get random segmentation faults. 

As Robert asked - you do have the VADSself 6.2.3d for 
HPUX 10.20?

>Nevertheless, when running the program under the debugger 
>it runs fine.

Yeah the VADS debugger is kinds of a pain on this.  Are
you using the command line debugger or a GUI one? We 
found the behaved in different manners.

>Any clue on how to solve this?

Yes.  First of all make sure you have the latest HP/UX 
ACE patches installed on your system.  If you dig deep
enough using the debugger you will eventually find that
the problem lies someplace in either the VADS runtime or
the HP/UX OS code.  Our segmentation faults went away
when we installed the ACE patches.

Another area that could be causing problems would be 
anyplace where you *might* have variant records that
are being allocated space by the following method:
1.  You have a standard record the same size as your 
    largest variant.
2.  You have access types for the standard & variant
    record.
3.  You use 'is new' to create space with the standard
    record.
4.  You then use unchecked conversion between the 
    two different access types.

You will find that the moment you try to access a
part of memory associated with the variant part of
the record, you get a core dump.

The fix is easy - do a pragma byte pack on both records.

There you go - that should save you a couple months worth
of digging.  You will be getting my bill in the morning <G>.

An ambassador for Christ
David Tannen (bluesguy@jcdisciples.org)
John 14:21 "Whoever has my commands and obeys them, he is the one who
            loves me.  He who loves me will be loved by my Father, 
            and I too will love him and show myself to him."
Check Out:   http://www.jcdisciples.org/davidtannen/index.html




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

* Re: Segmentation fault on VADSself
  1999-09-02  0:00 ` David Tannen
@ 1999-09-03  0:00   ` Simon Wright
  1999-09-04  0:00     ` David Tannen
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 1999-09-03  0:00 UTC (permalink / raw)


David Tannen <bluesguy@jcdisciples.org> writes:

> Another area that could be causing problems would be 
> anyplace where you *might* have variant records that
> are being allocated space by the following method:
> 1.  You have a standard record the same size as your 
>     largest variant.
> 2.  You have access types for the standard & variant
>     record.
> 3.  You use 'is new' to create space with the standard
>     record.
> 4.  You then use unchecked conversion between the 
>     two different access types.
> 
> You will find that the moment you try to access a
> part of memory associated with the variant part of
> the record, you get a core dump.

This sounds like bitter exerience speaking :-)

My advice, FWIW, would have been to find another way of solving this
problem that didn't involve variant records; it sounds horribly
non-portable!




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

* Re: Segmentation fault on VADSself
  1999-09-03  0:00   ` Simon Wright
@ 1999-09-04  0:00     ` David Tannen
  0 siblings, 0 replies; 5+ messages in thread
From: David Tannen @ 1999-09-04  0:00 UTC (permalink / raw)


Simon,

>This sounds like bitter exerience speaking :-)

It certainly is.

 
>My advice, FWIW, would have been to find another way of 
>solving this problem that didn't involve variant records; 
>it sounds horribly non-portable!

In my case I inherited a lot of code that is running on VAX,
Solaris & HP/UX.  The funny thing is that the very same code
w/ the very same version of the VADS compiler works perfectly
on Solaris.  Bizzare!

Just the joys of s/w development.

-- 
An ambassador for Christ
David Tannen (bluesguy@jcdisciples.org)
John 14:21 "Whoever has my commands and obeys them, he is the one who
            loves me.  He who loves me will be loved by my Father, 
            and I too will love him and show myself to him."
Check Out:   http://www.jcdisciples.org/davidtannen/index.html




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

end of thread, other threads:[~1999-09-04  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-30  0:00 Segmentation fault on VADSself FAVIER PIERRE
1999-08-30  0:00 ` Robert Dewar
1999-09-02  0:00 ` David Tannen
1999-09-03  0:00   ` Simon Wright
1999-09-04  0:00     ` David Tannen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox