Silverfrost Forums

Welcome to our forums

Bug with GET_STORAGE

21 Nov 2017 11:01 #20828

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

21 Nov 2017 12:31 #20829

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.

21 Nov 2017 1:40 #20830

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

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

	  NB	=  16 * ((BYTES+15)/16)
	  CALL GET_STORAGE@ (IA, NB)
21 Nov 2017 3:14 #20831

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.

Please login to reply.