forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bug with GET_STORAGE

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
StamK



Joined: 12 Oct 2016
Posts: 56

PostPosted: Tue Nov 21, 2017 12:01 pm    Post subject: Bug with GET_STORAGE Reply with quote

I am posting this in the 64bit forum although the 64bit version of GET_STORAGE works well but NOT the 32bit. The returned address is always -1 with a particular combination of calls (only in 32bit, 64bit works fine). This happens both in the 8.10 and 8.20 version

Fortran Exe -> Qt 5.6.1 MSVC 2015 DLL -> Fortran DLL

In the Fortran DLL we have the GET_STORAGE call.

Before I submit the full code to support (including Qt!), is there anything to suggest that the GET_STORAGE somehow starts from an out of bounds memory address and thinks there is no more space available?

Thanks
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5366
Location: Salford, UK

PostPosted: Tue Nov 21, 2017 1:31 pm    Post subject: Reply with quote

The first argument of GET_STORAGE@ should be a 32 bit integer variable for 32 bit code and a 64 bit integer variable for 64 bit code.

It should be possible to post just 2 or 3 lines of code that illustrates the way in which you are calling this routine.
Back to top
View user's profile Send private message
StamK



Joined: 12 Oct 2016
Posts: 56

PostPosted: Tue Nov 21, 2017 2:40 pm    Post subject: Reply with quote

I conveniently forgot to mention that the code works fine if run as a standalone program, it is the combination with the Qt 5.6.1 MSVC 2015 that causes this issue (and only in the 32bit world).

Code:
  INTEGER(KIND=7)       IA
  INTEGER*4   BYTES, NB

     NB   =  16 * ((BYTES+15)/16)
     CALL GET_STORAGE@ (IA, NB)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5366
Location: Salford, UK

PostPosted: Tue Nov 21, 2017 4:14 pm    Post subject: Reply with quote

This looks OK to me but I don't think that you need to round up the number of bytes for GET_STORAGE@. On the face of it, it looks like you are running out of memory on the global heap.

Item 368 in cwplus.enh describes a function that may be relevant.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group