gpre cobol can't access memory segfault with trace

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gpre cobol can't access memory segfault with trace

U-BLASTER-6000\mtdew


hi-

First off, thx. for very cool help earlier with tips to add flags or
switch to another version of gcc that is earlier. I got firebird source
to compile because my icu is under 59 for now.

I am trying to run a simple connect and disconnect to the firebird db
using cobol gpre.

It goes into fits around the lines where it tries to connect in my
output file from gpre.

I ran a back trace on it as per Brian Tiffin's suggestion at gnucobol. I
was able to use gdb.

I am posting the back trace. I can't make heads or tails of what it is
telling me other than there are memory problems in the code. If you know
what the back trace means can I have a hint please?

i got flamerobin and command-line isql to work.

thx in advance - jim

(gdb) bt
#0  0x00007ffff5dd5957 in memcpy@GLIBC_2.2.5 () from /lib64/libc.so.6
#1  0x00007ffff67cda94 in Firebird::Array<unsigned char, Firebird::InlineStorage<unsigned char, 128ul> >::push (itemsSize=19,
    items=0xf7ff24a0 <error: Cannot access memory at address 0xf7ff24a0>,
    this=0x7fffffffcd28) at ../src/include/../common/classes/array.h:328
#2  Firebird::ClumpletWriter::ClumpletWriter (this=0x7fffffffccf0,
    k=<optimized out>, limit=<optimized out>,
    buffer=0xf7ff24a0 <error: Cannot access memory at address 0xf7ff24a0>,
    buffLen=19, tag=<optimized out>)
    at ../src/common/classes/ClumpletWriter.cpp:88
#3  0x00007ffff64fb754 in isc_attach_database (
    user_status=<optimized out>, file_length=60,
    file_name=<optimized out>, public_handle=0x602190 <b_9>,
    dpb_length=<optimized out>,
    dpb=0xf7ff24a0 <error: Cannot access memory at address 0xf7ff24a0>)
    at ../src/jrd/why.cpp:1422
#4  0x0000000000400f77 in Moon_ (entry=0) at simple15.c:135
#5  0x0000000000400be5 in Moon () at simple15.c:48
#6  0x0000000000400bd0 in main (argc=1, argv=0x7fffffffdf98)
    at simple15.c:36
(gdb)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gpre cobol can't access memory segfault with trace

Paul Beach

> I ran a back trace on it as per Brian Tiffin's suggestion at gnucobol. I
> was able to use gdb.

I believe gnucobol is an implementation of opencobol, in which case this
is probably relevant...

http://www.ibphoenix.com/resources/documents/search/doc_382

Regards
Paul

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gpre cobol can't access memory segfault with trace

firebird-devel mailing list
In reply to this post by U-BLASTER-6000\mtdew


On 18.06.2017 04:41, U-BLASTER-6000\mtdew wrote:
> #3  0x00007ffff64fb754 in isc_attach_database (
>      user_status=<optimized out>, file_length=60,
>      file_name=<optimized out>, public_handle=0x602190 <b_9>,
>      dpb_length=<optimized out>,
>      dpb=0xf7ff24a0 <error: Cannot access memory at address 0xf7ff24a0>)
>      at ../src/jrd/why.cpp:1422
> #4  0x0000000000400f77 in Moon_ (entry=0) at simple15.c:135

The problem seems to be near frames 3&4:

Somewhy parameter passed from simple.c points to illegal memory address.

     dpb=0xf7ff24a0 <error: Cannot access memory at address 0xf7ff24a0>)

Fix it in simple.c.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gpre cobol can't access memory segfault with trace

U-BLASTER-6000\mtdew

Alex via Firebird-devel writes:

> On 18.06.2017 04:41, U-BLASTER-6000\mtdew wrote:
>> #3  0x00007ffff64fb754 in isc_attach_database (
>>      user_status=<optimized out>, file_length=60,
>>      file_name=<optimized out>, public_handle=0x602190 <b_9>,
>>      dpb_length=<optimized out>,
>>      dpb=0xf7ff24a0 <error: Cannot access memory at address 0xf7ff24a0>)
>>      at ../src/jrd/why.cpp:1422
>> #4  0x0000000000400f77 in Moon_ (entry=0) at simple15.c:135
>
> The problem seems to be near frames 3&4:
>
> Somewhy parameter passed from simple.c points to illegal memory address.
>
>      dpb=0xf7ff24a0 <error: Cannot access memory at address 0xf7ff24a0>)
>
> Fix it in simple.c.
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Hi- Alex

I tried so many times to fix simple.c I decided to abandon that
project. I put too many hours into it. There are so many other projects
that are out there. I may install firebird 2.1 and try that to see if it
is a difference between versions. I don't know how many people use
gnucobol with firebird gpre. Maybe someday there will be a more
extensive tutorial for installing it and getting it up and running.

thx. for the suggestion -

J.McNamara

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Loading...