View Issue Details

IDProjectCategoryView StatusLast Update
0000744JEDI Code LibraryJclRTTIpublic2005-02-16 01:34
ReporterglchapmanAssigned Tomarcelb 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000744: JclRTTI causes access violation locating IsClass
DescriptionIn the unit initialization section of JclRTTI, a call is made to LocateIsClass. This procedure attempts to get the address of the IsClass method in the system unit. Unfortunately, it appears it is not always correct about the offset within LocateIsClassHelper at which the call to IsClass occurs; I just compiled a project where the call occurred a few bytes beyond where expected. Anyway, in Delphi 5 (and I assume higher versions; also, I think it worked in Delphi 4), you don't have to go through such contortions to get the address of IsClass. Instead, you can do something like:

procedure LocateIsClass;
begin
  asm
    mov eax,OFFSET System.@IsClass
    mov OrgIsClass,eax
  end;
  Move(PChar(OrgIsClass, SavedIs, sizeof(SavedIs));
end;

And the same thing works for System.@AsClass (since LocateAsClass also has to be fixed).
TagsNo tags attached.
Fixed in GIT commit
Fixed in SVN revision
IDE version

Activities

marcelb

2003-04-30 06:50

manager   ~0001964

Fix incorporated for both routines. LocateIsClassHelper and LocateAsClassHelper are removed (obviously). Probably caused JVCL bug 0000890. (While thinking about the cause I suddenly remembered someone had reported a similar bug for JCL with a fix, that's also why it took so long before it got incorporated; I simply forgot about it).

Issue History

Date Modified Username Field Change
2005-02-16 01:34 Robert Rossmair Status resolved => closed