Merge branch 'master' of github.com:kripken/emscripten
This commit is contained in:
Коммит
f48ab8b31f
|
@ -3143,7 +3143,9 @@ LibraryManager.library = {
|
|||
// stdlib.h
|
||||
// ==========================================================================
|
||||
|
||||
malloc: Runtime.staticAlloc,
|
||||
malloc: function(bytes) {
|
||||
return Runtime.staticAlloc(bytes || 1); // accept 0 as an input because libc implementations tend to
|
||||
},
|
||||
_Znwj: 'malloc',
|
||||
_Znaj: 'malloc',
|
||||
_Znam: 'malloc',
|
||||
|
|
|
@ -1797,11 +1797,13 @@ if 'benchmark' not in str(sys.argv):
|
|||
printf("*%lu*\\n", strtoul("0", NULL, 0));
|
||||
printf("*%lu*\\n", strtoul("-10", NULL, 0));
|
||||
|
||||
printf("*malloc(0)!=0:%d*\\n", malloc(0) != 0); // We should not fail horribly
|
||||
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
|
||||
self.do_run(src, '*1,2,3,5,5,6*\n*stdin==0:0*\n*%*\n*5*\n*66.0*\n*10*\n*0*\n*-10*\n*18*\n*10*\n*0*\n*4294967286*\n*cleaned*')
|
||||
self.do_run(src, '*1,2,3,5,5,6*\n*stdin==0:0*\n*%*\n*5*\n*66.0*\n*10*\n*0*\n*-10*\n*18*\n*10*\n*0*\n*4294967286*\n*malloc(0)!=0:1*\n*cleaned*')
|
||||
|
||||
def test_time(self):
|
||||
# XXX Not sure what the right output is here. Looks like the test started failing with daylight savings changes. Modified it to pass again.
|
||||
|
|
Загрузка…
Ссылка в новой задаче