diff options
author | Rickard Green <[email protected]> | 2014-03-20 19:01:11 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-03-21 13:24:40 +0100 |
commit | bf3222f10edbd1f6a5186c8fb35c29900ad0665f (patch) | |
tree | fa761309c15de7996634a9474919c9621c126336 /erts/emulator/beam/erl_bif_ddll.c | |
parent | 3c06b5b3cdde72453d97910889e38e91c1dd4870 (diff) | |
download | otp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.tar.gz otp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.tar.bz2 otp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.zip |
Introduce minimum allowed major driver and nif versions on load
Diffstat (limited to 'erts/emulator/beam/erl_bif_ddll.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_ddll.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_ddll.c b/erts/emulator/beam/erl_bif_ddll.c index 1728b200f7..56cd2ba04f 100644 --- a/erts/emulator/beam/erl_bif_ddll.c +++ b/erts/emulator/beam/erl_bif_ddll.c @@ -1548,8 +1548,10 @@ static int do_load_driver_entry(DE_Handle *dh, char *path, char *name) switch (dp->extended_marker) { case ERL_DRV_EXTENDED_MARKER: - if (ERL_DRV_EXTENDED_MAJOR_VERSION != dp->major_version - || ERL_DRV_EXTENDED_MINOR_VERSION < dp->minor_version) { + if (dp->major_version < ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD + || (ERL_DRV_EXTENDED_MAJOR_VERSION < dp->major_version + || (ERL_DRV_EXTENDED_MAJOR_VERSION == dp->major_version + && ERL_DRV_EXTENDED_MINOR_VERSION < dp->minor_version))) { /* Incompatible driver version */ res = ERL_DE_LOAD_ERROR_INCORRECT_VERSION; goto error; |