Skip to content
Permalink
Browse files

increased max codesize from 65K opcodes to 1M

  • Loading branch information...
ncannasse committed Feb 6, 2014
1 parent 0c5d349 commit 33a9a460eb9ec8ae64ccb003ac7077a13561619c
Showing with 3 additions and 2 deletions.
  1. +2 −1 CHANGES
  2. +1 −1 vm/module.c
@@ -4,7 +4,8 @@
mod_neko/tora : use remote_ip (fixes Apache 2.2 returning 0.0.0.0 in 64 bits ?)
std : added buffer_get_length
std : added socket_send_to and socket_recv_from for UDP

all : increased max codesize from 65K opcodes to 1M

2013-02-23 : 2.0.0
all : changed license to MIT
mod_neko+mod_tora : fixed issue with get_client_ip in 64 bits mode /gcc
@@ -352,7 +352,7 @@ neko_module *neko_read_module( reader r, readp p, value loader ) {
READ_LONG(m->nglobals);
READ_LONG(m->nfields);
READ_LONG(m->codesize);
if( m->nglobals < 0 || m->nglobals > 0xFFFF || m->nfields < 0 || m->nfields > 0xFFFF || m->codesize < 0 || m->codesize > 0xFFFFF )
if( m->nglobals < 0 || m->nglobals > 0xFFFF || m->nfields < 0 || m->nfields > 0xFFFF || m->codesize < 0 || m->codesize > 0xFFFFFF )
ERROR();
tmp = (char*)malloc(sizeof(char)*(((m->codesize+1)>MAXSIZE)?(m->codesize+1):MAXSIZE));
m->jit = NULL;

5 comments on commit 33a9a46

@delahee

This comment has been minimized.

Copy link

replied Feb 10, 2014

wow the hardcoded limit is ok, but we should output a minimalist error message.

@gamedevsam

This comment has been minimized.

Copy link

replied Feb 14, 2014

Agreed, the error: Uncaught exception - std@module_read isn't very helpful at all.

@delahee

This comment has been minimized.

Copy link

replied Feb 14, 2014

@MetaChrome

This comment has been minimized.

Copy link

replied May 2, 2014

The opcode limit and some documentation regarding it would be quite useful. The error message(s):
Uncaught exception - load.c(398) : Invalid module 👍

Were quite vexxing ;) Nice to see it has been increased.

@gamedevsam

This comment has been minimized.

Copy link

replied May 2, 2014

It would be nice to get a new release with this fix, currently no games that use Nape run on neko...

Please sign in to comment.
You can’t perform that action at this time.