News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Global/Heap

Started by shankle, March 03, 2015, 09:26:41 PM

Previous topic - Next topic

shankle

Have some programs that have been tested and seem to work fine in 64-bit versions.
Then at a later time they fail. Microsoft's error code "c0000374".

I'm guessing but I think it involves the use of Global instructions for the Heap Manager.
Maybe there is a problem in using those instructions with 64-bit programs?
I have been leery of using the Heap instructions for that function due to the difficulty
of using them.
Again these same programs work fine in MASM32 and I wonder if 64-bit versions cause
this problem.

Also getting Microsoft's error code "c0000005" in different 64-bit programs but not sure
if it's related to my above problems.

Yuri

I have never had any such error on x64 with GlobalAlloc/Free if you mean these.

shankle

Thanks Yuri,
At least I now know to look elsewhere for my error.
Regards,
Jack

rrr314159

same as Yuri, "I have never had any such error on x64 with GlobalAlloc/Free" but since the error specifically refers to Heap Overrun seems it must be related. I do, however get c0000005 a lot when converting 32 to 64; usually my memory pointer (rdi, say) is 0. It happens because I had to change the pointers quite a lot going 32-64 and made a mistake doing so.

I also got c0000005 in relation to GlobalAlloc; not because there's anything wrong with it, but again, I made errors converting, and was trying to access outside the allocated block. Thinking (as u suspect) there was something wrong with alloc'ed mem, in desperation I converted all my alloc'ed blocks to uninitialized memory (data?) and cured the problem! So if it's convenient u might try that; can be easier to keep track of things that way. Later I went back to alloc'ed mem; was easy enough now, because I was starting with a stable program.

BTW I was converting many thousands of lines, so pointer mistakes were more or less inevitable; if you're dealing with much smaller progs u can probably see at a glance that your pointers are all right, so my experiences might not be applicable.
I am NaN ;)

shankle

Thank you RRR for your informative answer.
Yes the darned pointers can get out of hand.
For me it's very hard to debug with no debugger.

I remember the guy in your avatar in a program many years ago where
he found himself in a retirement home for agents. And he was always looking
for #!. I never found out how it ended.

rrr314159

shankle, why don't u use windbg? Free download from M$

It ended abruptly when the network axed "The Prisoner" because only thoughtful people watched it; too few of us, plus we don't believe commercials. It was replaced by "My Wife is a Car"
I am NaN ;)

FORTRANS

Hi,

Quote from: shankle on March 04, 2015, 11:38:50 AM
I remember the guy in your avatar in a program many years ago where
he found himself in a retirement home for agents. And he was always looking
for #!. I never found out how it ended.

   Well, it ended with two episodes that had a sort of farce going
on.  Some questions posed in the series got answered in what
appeared to be an abrupt manner.  And the wonks got to comment
on the series and expound their ideas.

Cheers,

Steve N.

dedndave

Danger Man 1960-1961
Secret Agent 1964-1967 - this is the one i remember him for   :biggrin:
The Prisoner 1967-1968
Rafferty 1977

remember the song by Johnny Rivers ?
https://www.youtube.com/watch?v=bG0u3-Gbu88

QuoteIt was replaced by "My Wife is a Car"

:lol:
i think you mean, "My Mother the Car"


rrr314159

Do I remember "Secret Agent Man" by Johnny Rivers!?! Is the Pope Catholic? "They've given you a number, and taken way your name ..."

"My Mother the Car" wasn't mindless enough, I felt, to put my point across with the proper punch, so I made up my own imaginary title. U call it a mistake, I call it poetic license
I am NaN ;)

dedndave

it was a stupid series - lol
but, i was a little kid, stupid was ok

they had a couple other series at that time that i liked - that also got canceled
one was "The Second Hundred Years"

http://www.imdb.com/title/tt0061293/

another was "The Monroes"

http://www.imdb.com/title/tt0060011/

i had a big ole' crush on a young Barbara Hershey   :P

both of them only ran for 1 season   :(