Jump to content
Sign in to follow this  
Ind

Introducing HPM Datacheck

Recommended Posts

HPM Data Check

  • I begin by thanking ai4rei for bringing this to our attention
  • HELLOOOO, WHAT?!
    • This introduces automatic data integrity insurance between plugins and the core, allowing the core to reject loading plugins whose data structures mismatch those in the core thus preventing potential crashes and loose data read/write, it goes a long way towards making this issue being inexistent.
    • In short: its a feature that enables the core to reject "outdated" plugins, "outdated" meaning that a data struct used by the plugin has been modified in the core while the plugin was not recompiled to reflect the change.
  • It is smart
    • Thanks to Haru's design the feature is able to identify the files which the plugin relies on, therefore even if data structs in the core have been modified the plugin will only fail load if its a data struct from a file it actually includes

Changes: Hello Plugin Developers!

  • Plugins are now required to include the HPMDataCheck file, plugins without it will not pass loading validation, to include use:
    #include "../common/HPMDataCheck.h"
    it should be the last file included, if it isn't the last it'll render the plugin uncompilable (intentionally).
  • ...and thats it, it stands on its own afterwards.

Also in & Thanks to Haru

  • the HPMHookGen has been updated so that the data HPMDataCheck relies on is always up to date
  • HPMHookGen has been sped up.

New Possibilities

  • Thanks to HPMDataCheck enabling the core to know which files the plugin relies on there are many enhancements we can (and intend to) add, for example, drop GET_SYMBOL entirely and have the core load the interfaces automatically

Special Thanks to

  • Haru
  • ai4rei

Link'u

Edited by Ridley

Share this post


Link to post
Share on other sites

I don't really know if this is the right place to post this, but im having some issues with this feature. Yesterday i updated my server and compiled it as usual without any errors. I might add that i added :

#include "../common/HPMDataCheck.h"

and made sure that it was the last included file:

http://imgur.com/UNqeg4T

But when i tried to run my server i got the following errors:

[Warning]: HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for plugin/HPMHooking.dll, most likely not including HPMDataCheck.h, skipping...[Warning]: HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for plugin/custom_plugin.dll, most likely not including HPMDataCheck.h, skipping...

So I checked the code again. I checked both my custom plugin and HPMHooking, and HPMDataCheck.h was indeed included in both of 'em.

 

When i compiled i used Microsoft Visual Studio Express 2013 and the Hercules-12.sln solution.

 

Edit: I tried the latest fresh Hercules and it gave me the same result when I uncommented HPMHooking in confplugins.conf. Am I doing something terribly wrong? S:

 

Edit2; https://github.com/HerculesWS/Hercules/commit/10c160a3317b63a8c59830f836b5adefb788e652 solved it.

Edited by akka

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.