Archive for the 'Delphi' Category
The title of posts like this is intended to indicate events that were pretty painful, and where the fault was all mine.
So, shortening up the damage chain, on IA-32, if you do this:
FSTP [some location]
FILD [some location]
and the FPU stack was empty at the FSTP, you’ll die on the FILD instruction. The FSTP just sets [...]
Dynamic linking has been available on most operating systems for a long long time now. It is interesting, however, to peer into the origins and resulting behavior of some aspects of symbol binding on various systems. You might be surprised by the results.
To focus this discussion, what I’m talking about here is basic support for [...]
I was part of the team that was passed through the Kylix threshing machine originally, so I decided to do a little research into shared library initialization and termination early on. Some very difficult to debug things can happen to you if you get surprised by library load/unload sequencing on a platform.
When we did the [...]
Purists and pragmatists will argue over the feature of converting hardware level exceptions into RTL exceptions. This is the feature where you catch, for example, a memory access violation and keep running your application. Purists will say you should never do that, because you could wind up doing serious damage down the line to users’ [...]Posted by Eli Boling on November 10th, 2009 under C_Builder, Delphi, OS X | 4 Comments »
I could write a lot about OS X malloc. Other people already have, and maybe I’ll write some more about it at a later date. I just wanted to point out a couple of things to make people think a little.
The default allocator you get when you call malloc has a bunch of debugging support [...]
This post falls into the category of ‘I don’t have anything better to write about just now.’ It’s been a little while since I’ve posted, and there was something vaguely interesting here, so why not, I figured.
So, when the MACH kernel loads up a task, it sets up the stack, and transfers control to the [...]
So, originally, Windows resources were designed when we didn’t have virtual memory support, and there was a need to have a well specified means for lazy loading of things like string tables and bitmaps. Once virtual memory support became mainstream, and the 16-bit days were over, this need diminished. However, by that time, there was [...]Posted by Eli Boling on July 30th, 2009 under C_Builder, Delphi | 9 Comments »
I used to think that the subtle bits of the POSIX API dlsym were the lookup ordering rules, and the interactions with shared libraries. That’s still true, but I’ve found a new thing to be thumped by.
For a very quick refresher for you readers, dlsym lets you lookup a symbol name in your load image [...]
Mac OS X uses the Mach-O format for binaries. The spec for this is well published. There’s a brief summary about it on Wikipedia: http://en.wikipedia.org/wiki/Mach-O. Mostly I have no objections to the file format. You always have to read over the specs carefully to discover all the gotchas. There’s one bit that caused me some headaches: [...]Posted by Eli Boling on May 26th, 2009 under C_Builder, Delphi, OS X | 3 Comments »
Preface: I’m back (again) [shades of Men In Black 2, sort of]. If you don’t understand what that means, don’t worry about it.
In the Mac OS X ABI Function Call Guide there is an innocent little sentence: "The stack is 16-byte aligned at the point of function calls." We’ve not been able to find out [...]