Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubsan: jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-date.c:82:27: runtime error: signed integer overflow: 19998030 * 365 cannot be represented in type 'int' #4704

Open
Cancelll opened this issue Jun 30, 2021 · 0 comments · May be fixed by #4914

Comments

@Cancelll
Copy link

JerryScript revision

ccc1525

Build platform

Ubuntu 20.04.1 LTS (Linux 5.4.0-74-generic x86_64)

Build steps
readonly FLAGS=(
  "-g -O1 -fsanitize=address,undefined -fno-sanitize-recover=undefined,address"
)
cmake -D CMAKE_C_FLAGS="${FLAG}" -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX:PATH="${INSTALL_DIR}" "${SRC_FOLDER}"
make
make install
Test case
new Date(20000000, 0)
Output
jerryscript/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-date.c:82:27: runtime error: signed integer overflow: 19998030 * 365 cannot be represented in type 'int'
batizdaniel added a commit to batizdaniel/jerryscript that referenced this issue Dec 23, 2021
This patch fixes jerryscript-project#4704

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
@batizdaniel batizdaniel linked a pull request Dec 23, 2021 that will close this issue
batizdaniel added a commit to batizdaniel/jerryscript that referenced this issue Jan 18, 2022
This patch fixes jerryscript-project#4704

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
batizdaniel added a commit to batizdaniel/jerryscript that referenced this issue Jan 21, 2022
This patch fixes jerryscript-project#4704

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
batizdaniel added a commit to batizdaniel/jerryscript that referenced this issue Jan 21, 2022
This patch fixes jerryscript-project#4704

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
batizdaniel added a commit to batizdaniel/jerryscript that referenced this issue Jan 21, 2022
This patch fixes jerryscript-project#4704

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant