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 

Search found 317 matches
forums.silverfrost.com Forum Index
Author Message
  Topic: undef test on a read from a probably corrupted file
KennyT

Replies: 6
Views: 4166

PostForum: 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: 4166

PostForum: 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: 4166

PostForum: 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: 4166

PostForum: 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: 45609

PostForum: 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: 45609

PostForum: 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: 45609

PostForum: 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: 45609

PostForum: 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: 45609

PostForum: 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: 45609

PostForum: 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: 45609

PostForum: 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: 45609

PostForum: 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 ...
  Topic: GET_GSTORAGE@ doesn't always work?
KennyT

Replies: 52
Views: 45609

PostForum: Support   Posted: Fri Jan 13, 2023 12:47 pm   Subject:
Hmmm, i don't think that works?

do you get different values returned by alloc if you call it more than once without dealloc-ing?

i'm experimenting with a "hybrid" solution that seems f ...
  Topic: GET_GSTORAGE@ doesn't always work?
KennyT

Replies: 52
Views: 45609

PostForum: Support   Posted: Fri Jan 13, 2023 10:23 am   Subject:
hi, could you email me that text block? when I copy/paste it, it won't compile (it's got some sort of illegal character (hex"A0") embedded in it)

K
  Topic: GET_GSTORAGE@ doesn't always work?
KennyT

Replies: 52
Views: 45609

PostForum: Support   Posted: Mon Jan 09, 2023 7:29 pm   Subject:
following up...

the actual crash happens on a "write" statement, which, IIRC, means it's actually happened somewhere else and the write statement is the first time windows gets an opportu ...
 
Page 1 of 22 Goto page 1, 2, 3 ... 20, 21, 22  Next
All times are GMT + 1 Hour
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group