Author |
Message |
Topic: Possible bug |
KennyT
Replies: 8
Views: 51265
|
Forum: Support Posted: Wed Aug 27, 2025 7:42 am Subject: |
I think i may have sussed my error.
if you only load the main object file in slink and don't specify to load the module object as well, then it fails at runtime.
if you include loading the modul ... |
Topic: Possible bug |
KennyT
Replies: 8
Views: 51265
|
Forum: Support Posted: Tue Aug 26, 2025 8:40 am Subject: similar issue? MODULE declared and compiled separately |
Compile this 3 line module separately, then comment it out before compiling the main program with /undef.
!ftn95$free
module testmod
real*8, allocatable :: dshfts(:), deps ... |
Topic: MAXVAL with /check-option |
KennyT
Replies: 9
Views: 36096
|
Forum: 64-bit Posted: Fri Jun 14, 2024 11:17 am Subject: |
MINVAL seems to have a similar problem in 64bits...
even if i set the /inhibit_check 20, when i come to run the following line, I get an Access violation trying to access address x0...048 in the MI ... |
Topic: undef test on a read from a probably corrupted file |
KennyT
Replies: 6
Views: 14446
|
Forum: 64-bit Posted: Thu Sep 07, 2023 6:43 pm Subject: on a similar but unrelated subject |
should this code work under /undef?
INTEGER(KIND=7) :: I7=0
INTEGER*4 IKINDSIZE
INQUIRE(IOLENGTH=IKINDSIZE) I7
it returns 4 or 8 into IKINDSIZE under normal usage but claims that I' ... |
Topic: undef test on a read from a probably corrupted file |
KennyT
Replies: 6
Views: 14446
|
Forum: 64-bit Posted: Thu Sep 07, 2023 5:45 pm Subject: |
ok, i've sent you a zip file via "hightail".
just unzip to a new folder and
sdbg64 new1
it should crash at the relevant point...
k |
Topic: undef test on a read from a probably corrupted file |
KennyT
Replies: 6
Views: 14446
|
Forum: 64-bit Posted: Thu Sep 07, 2023 12:55 pm Subject: |
not easily. It only happens with a specific datafile. I can try to isolate the particular subroutine and see if that fails with a "wrapper" opening the datafile but it may require lots of ... |
Topic: undef test on a read from a probably corrupted file |
KennyT
Replies: 6
Views: 14446
|
Forum: 64-bit Posted: Thu Sep 07, 2023 9:32 am Subject: undef test on a read from a probably corrupted file |
hi,
i have the following block of code that i was unable to use /UNDEF on under ftn32 (because of the negative address problem) but i can use /UNDEF under ftn64:
IF( IREV.GE.462 ) THEN
... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Wed Jan 18, 2023 10:03 am Subject: |
just for reference, this all started when we wanted to trap some use of uninitialised memory locations and we found that we couldn't use /UNDEF because of the prevalence of these error 14s.
but if ... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Wed Jan 18, 2023 9:50 am Subject: |
ok, at least that clarifies why we're getting the false positives.
and we have a (albeit long-winded) workaround of passing a simple variable to our memory accessing routines and copying that to/fr ... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Wed Jan 18, 2023 7:14 am Subject: |
ok, following on from Robert's comment, i noticed what was causing the error 14's!
passing a structure element (defined in a module?) to a subroutine compiled with /undef can cause it.
passing ... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Tue Jan 17, 2023 6:30 pm Subject: |
i appreciate that, but the runtime error 14 is surely yours to try to address, given that we can clearly demonstrate that, in many circumstances, it's a false positive.
a switch to inhibit this er ... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Tue Jan 17, 2023 10:30 am Subject: |
thanks Paul, that appears to work well, although i am still getting some "un-debuggable" run time errors, that i assume are due to errors in our fortran code (or the data being read being to ... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Fri Jan 13, 2023 2:57 pm Subject: Re: |
Here is some code that illustrates how to get the address of a block of memory from the global heap using a call to ALLOCATE and FTN95.
subroutine alloc(addr, size)
integer(7): ... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Fri Jan 13, 2023 1:17 pm Subject: Re: |
It is worth remembering that VirtualAlloc allocates (or uses memory) at page size granularity. So an alloc of a few bytes takes a full 4K page
Robert, Your earlier statement that you provided inte ... |
Topic: GET_GSTORAGE@ doesn't always work? |
KennyT
Replies: 52
Views: 90615
|
Forum: Support Posted: Fri Jan 13, 2023 1:14 pm Subject: Re: |
That is strange, and may be related to the exact details of your copy-paste procedure. I used Firefox on Windows to copy, and pasted by redirection to a file in a command window, and did not find any ... |
|