lygstate/jerryscript

Snapshot error: RangeError: Unsupported static snapshot literal: 2147483647

lygstate opened this issue · 0 comments

JerryScript revision

34a6a93

Build platform

Linux-4.4.0-19041-Microsoft-x86_64-with-Ubuntu-20.04-focal

Build steps
python tools/build.py --snapshot-exec=ON --snapshot-save=ON --jerry-cmdline-snapshot=ON
Test case

creating static snapshot for test.js

function a() {
	return 0x7FFFFFFF
}

function b() {
	return 0xFFFFFFFF
}

function c() {
	return 3.4028234663852886e+38
}

Test step:

export PATH=$PATH:$PWD/build/bin/
jerry-snapshot generate  -o test.snapshot test.js
jerry-snapshot litdump -o test.list test.snapshot
jerry-snapshot generate  -o test.final.snapshot --static --load-literals-list-format test.list test.js

Output
lygstate@DESKTOP-94PU0GB:/mnt/c/work/study/languages/typescript/jerryscript$ jerry-snapshot generate  -o test.final.snapshot --static --load-literals-list-format test.list test.js
Input file 'test.js' (133 bytes) loaded.
Input file 'test.list' (22 bytes) loaded.
Error: Generating snapshot failed!
Snapshot error: RangeError: Unsupported static snapshot literal: 2147483647